The API can be extended to write desired deployment state to a Git repository instead of applying manifests directly. A GitOps controller such as Argo CD or Flux would then reconcile the cluster from that repository.
- Developer requests a deployment.
- Platform validates service, environment, and policy.
- Platform writes an environment-specific values file.
- Platform opens a pull request or commits to an approved branch.
- Argo CD or Flux reconciles the generated desired state.
- Platform tracks status through controller webhooks or Kubernetes watch events.
See infra/gitops/services/payments-api-production.yaml.
- auditable deployment changes
- normal code review for production state
- easy drift detection
- platform API stays focused on workflow and policy
- cluster reconciliation is delegated to a proven controller
- slower deploy path if pull requests are required
- status reporting needs controller integration
- rollback can be modeled as another Git commit rather than an imperative cluster change