WAF-OPS-110 β GitOps-based deployments SHOULD be preferred for Kubernetes and container workloads
Description
Kubernetes and container workloads SHOULD be deployed via GitOps controllers that reconcile desired state from Git. GitOps repositories MUST enforce peer review, branch protection, and signed commits. Controllers MUST report sync status, drift, and errors to observability systems. Manual imperative changes to clusters MUST be reconciled or rejected.
Rationale
| Risk | Description |
|---|---|
Risk |
Imperative cluster changes bypass audit trails and create drift between environments. |
Risk |
Missing GitOps reconciliation leaves clusters in undocumented, non-reproducible states. |
Requirements
-
Kubernetes and container workloads SHOULD be deployed via GitOps controllers that reconcile desired state from Git.
-
GitOps repositories MUST enforce peer review, branch protection, and signed commits.
-
Controllers MUST report sync status, drift, and errors to observability systems.
-
Manual imperative changes to clusters MUST be reconciled or rejected.
Implementation Guidance
-
Document the requirement in a version-controlled policy, ADR, or standard.
-
Assign ownership and establish a review cadence (e.g., quarterly).
-
Implement the required configuration as code in Terraform or equivalent IaC.
Maturity Levels
| Level | Name | Criteria |
|---|---|---|
L1 |
Ad hoc β control not consistently applied |
* Die Anforderung ist nicht einheitlich umgesetzt; Nachweis existiert nur punktuell oder fehlt. |
L2 |
Standardised β policy defined and communicated |
* Eine dokumentierte Policy oder ein Standard beschreibt die Anforderung. |
L3 |
Integrated β automated validation in CI/CD |
* Terraform-Checks oder IaC-Gates prΓΌfen die Anforderung automatisch in CI/CD. |
L4 |
Auditable β metrics and exceptions tracked |
* Abdeckung, Ausnahmen und QualitΓ€tsmetriken werden quartalsweise berichtet. |
L5 |
Optimised β continuous improvement based on data |
* Die EffektivitΓ€t wird kontinuierlich gemessen und automatisch optimiert. |
Checks
waf-ops-110.tf.aws.eks-gitops-addon
Engine: terraform | Provider: aws | Automated: Yes
AWS EKS should deploy GitOps agent via EKS add-on or Helm
AWS EKS should deploy GitOps agent via EKS add-on or Helm
Scope: resource β aws_eks_addon, helm_release
Assertions:
* addon_name in ['fluxcd', 'argo-cd'] β EKS should have a GitOps add-on installed.
Remediation: AWS EKS should deploy GitOps agent via EKS add-on or Helm
# Example compliant with waf-ops-110.tf.aws.eks-gitops-addon
# Example non-compliant with waf-ops-110.tf.aws.eks-gitops-addon
waf-ops-110.tf.azurerm.gitops-extension
Engine: terraform | Provider: azurerm | Automated: Yes
Azure AKS should use Flux extension for GitOps
Azure AKS should use Flux extension for GitOps
Scope: resource β azurerm_kubernetes_cluster_extension
Assertions:
* extension_type in ['microsoft.flux'] β AKS should use microsoft.flux GitOps extension.
Remediation: Azure AKS should use Flux extension for GitOps
# Example compliant with waf-ops-110.tf.azurerm.gitops-extension
# Example non-compliant with waf-ops-110.tf.azurerm.gitops-extension
waf-ops-110.config.gitops-policy
Engine: config | Provider: any | Automated: No
GitOps policy must be documented
GitOps policy must be documented
Scope: file β docs/devops/gitops-policy.md
Assertions:
* exists attribute_exists β GitOps policy must describe repository structure and reconciliation.
Remediation: GitOps policy must be documented
# Example compliant with waf-ops-110.config.gitops-policy
# Example non-compliant with waf-ops-110.config.gitops-policy
Evidence
-
Terraform configuration implementing the requirement.
-
Policy, ADR, or standard documenting the requirement.
-
Optional cloud console or API output confirming runtime state.
Related Controls
-
WAF-REL-110 == Regulatory Mapping
-
AWS Well-Architected Framework: OPS 5 β Operate as a unified whole
-
SRE Book (Google): Chapter 7 β The Evolution of Automation at Google
-
NIST CSF 2.0: PR.IP-01 β Baseline configurations