ADR-007: GitOps with Argo CD for STOA Continuous Deployment
Metadataβ
| Field | Value |
|---|---|
| Status | β Accepted |
| Date | 15 January 2026 |
| Linear | CAB-483 |
Contextβ
STOA Platform requires a continuous deployment (CD) strategy suited to its cloud-native Kubernetes architecture. The current CI pipeline (GitLab CI) effectively handles build, tests, SBOM generation and image signing (Cosign).
Identified Constraintsβ
| Constraint | Impact |
|---|---|
| Enterprise compliance | Target clients (banking, insurance, logistics) require complete audit trail |
| R&D tax credit eligibility | Need for fine-grained R&D activity traceability (who/what/when) |
| Multi-environment | Dev β Staging β Prod with differentiated configurations |
| Supply chain security | SBOM, SLSA attestations, signed images |
| Small team | Minimize operational overhead |
Decisionβ
Selected option: GitOps with Argo CD (pull-based)
CI (GitLab) / CD (Argo CD) separation. The cluster "pulls" the desired state from a dedicated Git repo.
Options Consideredβ
| Option | Description | Verdict |
|---|---|---|
| GitLab CI end-to-end | Push-based, CI runners with cluster access | β High attack surface |
| GitOps with Argo CD | Pull-based, cluster pulls from Git | β Selected |
| GitOps with Flux CD | Pull-based, lighter but no UI | β Less visibility for demos |
Justificationβ
- STOA security alignment: Pull-based model reinforces "security-first" messaging
- R&D tax credit: Each deployment automatically generates a timestamped proof in Git
- MVP demos: Argo CD UI allows visual demonstration of deployment state
- Ecosystem: De facto standard in the CNCF/Kubernetes ecosystem
Architectureβ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β GitLab CI β β Container β β Git Repo β
β (CI only) ββββββΆβ Registry β β stoa-envs β
β β β (GitLab/OCI) β β (desired state)β
βββββββββββββββββββ βββββββββββββββββββ ββββββββββ¬βββββββββ
β
βββββββββββββββββββββββββββββ
β pull (reconciliation loop)
βΌ
βββββββββββββββββββ
β Argo CD β
β (in-cluster) β
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββ βββββββββββββ βββββββββββββ
β Dev β β Staging β β Prod β
β Cluster β β Cluster β β Cluster β
βββββββββββββ βββββββββββββ βββββββββββββ
Promotion Workflowβ
- Merge to
main(stoa-platform) β GitLab CI build β Tagged + signed image β Registry - Automatic PR on
stoa-envs: bump image version inenvs/dev/ - Argo CD sync: automatic dev deployment
- Staging promotion: PR merge
devβstaging(review required) - Prod promotion: PR merge
stagingβprod(approval + smoke tests)
stoa-envs Repo Structureβ
stoa-envs/
βββ base/ # Common resources
β βββ kustomization.yaml
β βββ stoa-gateway/
β βββ stoa-control-plane/
β βββ observability/
βββ components/ # Optional components
β βββ vault-injection/
β βββ istio-sidecar/
β βββ debug-mode/
βββ envs/ # Per-environment overlays
β βββ dev/
β βββ staging/
β βββ prod/
βββ argocd/ # Argo CD configuration
βββ projects/
βββ applications/
βββ applicationsets/
GitOps Roadmapβ
Phase 1: GitOps Foundation β β
| Deliverable | Description |
|---|---|
| Argo CD | Installation + Keycloak SSO |
stoa-envs repo | Kustomize base/overlays structure |
| Applications | Dev (auto-sync), Staging (auto-sync), Prod (manual) |
| External Secrets | Vault integration |
Phase 2: Progressive Deliveryβ
| Deliverable | Description |
|---|---|
| Argo Rollouts | Canary deployments (20% β 50% β 100%) |
| AnalysisTemplate | Auto-rollback based on Prometheus metrics |
| ApplicationSet | Dynamic app generation per tenant |
Phase 3: Enterprise Hardeningβ
| Deliverable | Description |
|---|---|
| Gatekeeper/OPA | Security policies |
| Drift Detection | Automatic alerting |
| KPIs Dashboard | Grafana with GitOps metrics |
GitOps KPIsβ
| KPI | Description | Target |
|---|---|---|
| Tenant lead time | Commit β Prod | < 15 min |
| Successful rollback rate | Auto rollbacks without intervention | > 95% |
| MTTR | Mean Time To Recovery | < 5 min |
| Drift resolution | Drift detection and correction | < 1 min |
| Traceable deployments | Git commits with author/date | 100% |
Consequencesβ
Positiveβ
- β Complete and automatic audit trail (R&D tax credit value)
- β Instant rollback via Git
- β Automatic drift detection and correction
- β Reduced attack surface (CI without prod access)
- β Deployment state visualization for demos
Negative (mitigations)β
- β οΈ Secrets: External Secrets Operator integrated from the start
- β οΈ Training: Kustomize workflow documentation
- β οΈ Complexity: Well-designed repo structure