Code Organisation Strategy for GitOps
Mezbaur Rahman
Posted on February 19, 2022
One of the most often question is: Is GitOps just another way of doing CI/CD? The answer to this question is simply NO. GitOps only takes care of the CD part, the delivery part. To achieve this, one would think about organising the repo structure. So, you would maintain 3 different repos to main:
- GitOps Fleet
- Project Deployment
- Project/App Source
GitOps Fleet Repository to manage organisation wide deployments to Kubernetes with FluxCD. This repository would contain
- Cluster Configuration
- Cluster Wide Infrastructure Components e.g. Ingress Controllers, Repository Secrets etc.
- Project onboarding configurations aka. tenants spec.
Project Deployment Repository (tenant). This repository would contain k8s manifests for
- infra
- app and
- pipelines/tekton
The code could be either
- Helm charts source code
- YAML Manifests as either
- Plain YAML
- Kustomize Overlays
Project/App Source Repository
- Application Source Code
- Contains Source Code + Dockerfile etc.
Now, the following diagram shows the code organisation strategy described above, above with a clear separation of the CI and CD stages.
note: I have taken encouragement from this example.
Posted on February 19, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 29, 2024
November 28, 2024