Your primary RAIL namespace in all the clusters deploys everything that's defined in the subdirectory that matches:
repo name (this repo) / cluster name / RAIL Using Kustomize it's easy to manage your resources in a GitOps way.
Some tips:
- If you want to add a new app or resource, you should add it to the
basedirectory. - If you want to include/enable it in a specific cluster, you must add it to a
kustomization.yamlin RAIL directory in a directory.
This way, adding resources in base makes it available for all clusters but the kustomization.yaml.
The following structure is not mandatory, but recommended:
βββ .sops.pub.asc # A public PGP key you can use to sign secrets that will be decoded in the clusters by SOPS (mozilla Secret OPerationS)
βββ .sops.yaml # A configuration file that tells SOPS which values to encrypt
βββ base # This level contains apps and resources that's available for use in all clusters
βΒ Β βββ example-from-docs # This level represents this app and its set of resources. It must include kuztomization.yaml that includes the other manifest files
βΒ Β βΒ Β βββ deployment.yaml
βΒ Β βΒ Β βββ ingress.yaml
βΒ Β βΒ Β βββ kustomization.yaml # This file includes the other manifest files
βΒ Β βΒ Β βββ service.yaml
βΒ Β βββ README.md # Love your READMEs, and feed and exercise them regulary and keep them lean.
βββ osl1-test # This directory level representes the configuration thats unique for a specific cluster
βΒ Β βββ example-from-docs # This directory level represents configuration for this app in the osl1-test cluster
βΒ Β βββ RAIL # This is where the fluxcd controller finds deployments for this cluster
βββ README.md
βββ bgo1-prod # You guessed it, this is another cluster, for your production workloads
Β Β βββ RAIL # ...and this is where the fluxcd controller finds deployments for this specific cluster
Β Β β Β Β βββ some_app
Β Β β Β Β Β Β Β Β βββ kustomization.yaml # Define a namespace and a fluxcd kustomization here in order to deploy some_app
Β Β βββ some_app #
Β Β Β Β Β Β Β Β βββ kustomization.yaml # This file includes the base directory and the other manifest files, enabling the resources in the cluster