Aller au contenu principal

ADR-007: GitOps with Argo CD for STOA Continuous Deployment

Metadata​

FieldValue
Statusβœ… Accepted
Date15 January 2026
LinearCAB-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​

ConstraintImpact
Enterprise complianceTarget clients (banking, insurance, logistics) require complete audit trail
R&D tax credit eligibilityNeed for fine-grained R&D activity traceability (who/what/when)
Multi-environmentDev β†’ Staging β†’ Prod with differentiated configurations
Supply chain securitySBOM, SLSA attestations, signed images
Small teamMinimize 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​

OptionDescriptionVerdict
GitLab CI end-to-endPush-based, CI runners with cluster access❌ High attack surface
GitOps with Argo CDPull-based, cluster pulls from Gitβœ… Selected
GitOps with Flux CDPull-based, lighter but no UI❌ Less visibility for demos

Justification​

  1. STOA security alignment: Pull-based model reinforces "security-first" messaging
  2. R&D tax credit: Each deployment automatically generates a timestamped proof in Git
  3. MVP demos: Argo CD UI allows visual demonstration of deployment state
  4. 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​

  1. Merge to main (stoa-platform) β†’ GitLab CI build β†’ Tagged + signed image β†’ Registry
  2. Automatic PR on stoa-envs: bump image version in envs/dev/
  3. Argo CD sync: automatic dev deployment
  4. Staging promotion: PR merge dev β†’ staging (review required)
  5. 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 βœ…β€‹

DeliverableDescription
Argo CDInstallation + Keycloak SSO
stoa-envs repoKustomize base/overlays structure
ApplicationsDev (auto-sync), Staging (auto-sync), Prod (manual)
External SecretsVault integration

Phase 2: Progressive Delivery​

DeliverableDescription
Argo RolloutsCanary deployments (20% β†’ 50% β†’ 100%)
AnalysisTemplateAuto-rollback based on Prometheus metrics
ApplicationSetDynamic app generation per tenant

Phase 3: Enterprise Hardening​

DeliverableDescription
Gatekeeper/OPASecurity policies
Drift DetectionAutomatic alerting
KPIs DashboardGrafana with GitOps metrics

GitOps KPIs​

KPIDescriptionTarget
Tenant lead timeCommit β†’ Prod< 15 min
Successful rollback rateAuto rollbacks without intervention> 95%
MTTRMean Time To Recovery< 5 min
Drift resolutionDrift detection and correction< 1 min
Traceable deploymentsGit commits with author/date100%

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

References​