Skip to content

bumble-tech/demo-gitops-repository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitOps repository: Two-level overlays

GitOps repository with a dummy application for demonstration purposes. Related to article: https://medium.com/bumble-tech/gitops-for-multi-cluster-k8s-environments-d305431ba6d6

Repository structure

β”œβ”€β”€ base
β”‚Β Β  └── hello-app
β”‚Β Β      β”œβ”€β”€ base
β”‚Β Β      β”‚Β Β  β”œβ”€β”€ kustomization.yaml
β”‚Β Β      β”‚Β Β  └── manifest.yaml
β”‚Β Β      └── bumble-overlay
β”‚Β Β          β”œβ”€β”€ kustomization.yaml
β”‚Β Β          └── patches
β”‚Β Β              └── bumble_patch.yaml
└── overlays
    β”œβ”€β”€ zone-1
    β”‚Β Β  β”œβ”€β”€ argocd-applications
    β”‚Β Β  β”‚Β Β  └── hello-app.yaml
    β”‚Β Β  β”œβ”€β”€ hello-app
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ kustomization.yaml
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ params.env
    β”‚Β Β  β”‚Β Β  └── params.yaml
    β”‚Β Β  └── kustomization.yaml
    └── zone-2
        β”œβ”€β”€ argocd-applications
        β”‚Β Β  └── hello-app.yaml
        β”œβ”€β”€ hello-app
        β”‚Β Β  β”œβ”€β”€ kustomization.yaml
        β”‚Β Β  β”œβ”€β”€ params.env
        β”‚Β Β  └── params.yaml
        └── kustomization.yaml

This repo serves as an example of how to apply two-level overlay structure to a GitOps repo.

  1. hello-app is one of our applications.
  2. base/hello-app/bumble-overlay contains a company-specific overlay that:
    1. Updates image of container to bash:latest
    2. Replaces DRAGON_NAME environment variable with a placeholder that we're filling in zone overlays
  3. overlays/zone-1/hello-app contains a zone-specific overlay for hello-app that replaces the DRAGON_NAME placeholder with a name of the dragon specified in overlays/zone-1/hello-app/params.env

By following these simple steps, we've introduced two changes to the base resource:

  1. company-specific but zone-agnostic change
  2. zone-specific change

Leaving the resource itself as is.

So, with this structure, both company-specific and zone-specific changes are transparent and clear, and next time we need hello-app upgraded, we're just replacing base/manifest.yaml with the one provided by developer. Same applies to more complex resources.

NOTE

You may need to disable load restrictor by passing --load-restrictor none or --load-restrictor LoadRestrictionsNone to kustomize.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages