A practical starting point for ATLAS-based Kubernetes deployments with ArgoCD.
- ArgoCD with a helmfile CMP (Config Management Plugin) sidecar, so ArgoCD can render helmfile-based repositories like ATLAS.
- ATLAS ApplicationSet that automatically discovers all deployments in this repository and creates ArgoCD Applications for each cluster/deployment pair.
- Snapshot Review workflow that shows rendered manifest diffs on every pull request.
-
Use this template to create your own repository (or fork it).
-
Update
deployments/global.values.yaml— setatlas.repoURLto your repository URL. -
Review
deployments/in-cluster/— this matches ArgoCD's default cluster name for itself. Rename it if your cluster is registered under a different name. -
Render locally to verify your setup:
helmfile -f helmfile.yaml.gotmpl template
-
Bootstrap — apply the ArgoCD and ATLAS deployments manually for the first time:
# Ensure your kubeconfig points to the target cluster helmfile -f helmfile.yaml.gotmpl apply \ --selector bootstrap=trueAfter this, ArgoCD takes over and manages all deployments via the ApplicationSet.
Labels like
bootstrapare defined per deployment indeployment.yamland can be used to select any group of deployments. This is useful beyond initial setup — for example, you can label a one-time recovery job to restore a backup and apply it with a single selector. -
Push to main to create the first snapshot baseline for PR reviews.
helmfile.yaml.gotmpl # Entry point — references ATLAS remotely
deployments/
global.values.yaml # Values for ALL clusters (git repo URL, etc.)
apps/ # Global deployments (applied to every cluster)
in-cluster/ # ArgoCD's default self-cluster name
cluster.values.yaml # Values for this cluster
apps/
argocd/
deployment.yaml # ArgoCD + helmfile CMP sidecar
atlas/
deployment.yaml # ATLAS ApplicationSet for ArgoCD
templates/
argocd/
helmfile.yaml.gotmpl # ArgoCD Helm release with CMP config
atlas-appset/
helmfile.yaml.gotmpl # ApplicationSet that discovers deployments
Create a new directory under your cluster's apps/ and add a deployment.yaml:
mkdir -p deployments/in-cluster/apps/my-app# deployments/in-cluster/apps/my-app/deployment.yaml
apps:
- template: my-app
namespace: my-namespace
settings:
autosync: "true"Then create the matching app template in templates/my-app/helmfile.yaml.gotmpl.
ATLAS supports SOPS-encrypted value files (*.values.sops.yaml) at every hierarchy level. Secrets are encrypted per-key, so you can mix encrypted and plain values in the same file.
You need two separate age keys — one for ArgoCD (cluster-side decryption) and one for CI (snapshot review):
-
Generate keys:
# Key for ArgoCD — used at render time in the cluster age-keygen -o argocd-age-key.txt # Key for CI — used by the snapshot review workflow age-keygen -o ci-age-key.txt
-
Add both public keys as recipients in your
.sops.yaml:creation_rules: - path_regex: values\.sops\.yaml$ age: >- age1...(argocd key)..., age1...(ci key)...
-
Create the ArgoCD secret on each cluster that needs to decrypt secrets:
kubectl -n argocd create secret generic argocd-age-key \ --from-file=keys.txt=argocd-age-key.txt
The ArgoCD helmfile sidecar mounts this secret automatically and sets
SOPS_AGE_KEY_FILE. The volume is markedoptional, so ArgoCD starts fine without it — SOPS decryption simply fails at render time for encrypted files. -
Store the CI key as a GitHub repository secret named
SOPS_AGE_KEY, then uncomment thesecrets:block in.github/workflows/atlas-review.yml.
# Create a new encrypted values file
sops --encrypt --in-place deployments/in-cluster/cluster.values.sops.yaml
# Edit an existing encrypted file
sops deployments/in-cluster/cluster.values.sops.yaml
# Re-encrypt after adding a new recipient
sops updatekeys deployments/in-cluster/cluster.values.sops.yamlThe included GitHub Actions workflow (.github/workflows/atlas-review.yml) automatically:
- On push to main: renders all manifests and stores a baseline snapshot.
- On pull request: renders manifests, diffs against the baseline, and posts a comment showing exactly what changed — organized by cluster and deployment.
If you use SOPS-encrypted values, see the SOPS / age encryption section above for key setup. Decrypted values are automatically redacted (*REDACTED*) in snapshot output — secrets are never exposed in PR comments.
See the ATLAS documentation for the full reference on value inheritance, app template authoring, SOPS integration, and deployment automation.