Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

GitOps — Patterns and Anti-patterns

07. 11. 2025 Updated: 24. 03. 2026 1 min read intermediate

DevOps Intermediate

GitOps — Patterns and Anti-patterns

GitOpsArgoCDFluxBest Practices 6 min read

GitOps architectural patterns. Monorepo vs polyrepo, environment promotion, secrets management.

Repo Strategy

  • App repo + Config repo (recommended)
  • Monorepo — simpler for small teams
  • Repo per environment — maximum isolation
├── apps/
│   ├── api-gateway/
│   │   ├── base/
│   │   │   ├── deployment.yaml
│   │   │   ├── service.yaml
│   │   │   └── kustomization.yaml
│   │   └── overlays/
│   │       ├── dev/
│   │       ├── staging/
│   │       └── prod/
├── infrastructure/
│   ├── cert-manager/
│   └── monitoring/
└── clusters/
    ├── dev/
    ├── staging/
    └── prod/

Environment Promotion

  1. CI builds image and pushes with tag (git SHA)
  2. CI updates image tag in overlays/dev/
  3. GitOps sync to dev
  4. Automated tests
  5. PR from dev to staging overlay
  6. Review + merge, then sync to staging
  7. PR to prod, merge, then sync to prod

Secrets in GitOps

  • Sealed Secrets — encrypted in Git (Bitnami)
  • SOPS — Mozilla SOPS with age/KMS
  • External Secrets Operator — sync from Vault/AWS SSM/Azure KV
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: api-keys
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: azure-keyvault
    kind: ClusterSecretStore
  target:
    name: api-keys
  data:
    - secretKey: DATABASE_URL
      remoteRef:
        key: prod-database-url

Anti-patterns

  • Manual kubectl apply alongside GitOps leads to drift
  • Secrets in plaintext in Git
  • Skipping environments
  • No drift detection
  • PRs too large to review

Summary

GitOps requires discipline in repo structure, environment promotion and secrets management. Never commit secrets in plaintext.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.