argocd-conventions
Skill7 starsChanged 4 days agoMITView on GitHub
Argo CD objects in any GitOps repository. TRIGGER when: writing an `Application`, `ApplicationSet`, `AppProject`, the app-of-apps directory or generator inputs; adding a project, app or cluster; bumping a chart version or its values there; user asks about Argo CD, generators, sync policy or waves. SKIP when: authoring the chart itself (`helm-conventions`), or manifests with no Argo CD involvement.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- leroyguillaume/skillsword for word, first seen Nov 22, 2026
Other versions1 project uses a version of this.
Word for word · 1
- leroyguillaume/skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- adr-conventionsSkill
- api-conventionsSkill
- architecture-conventionsSkill
- ci-conventionsSkill
- config-conventionsSkill
- contributing-conventionsSkill
- councilSkill
- cryptography-conventionsSkill
- dependency-update-conventionsSkill
- diagram-conventionsSkill
- docker-conventionsSkill
- documentation-conventionsSkill
- frontend-conventionsSkill
- github-actions-conventionsSkill
- github-issue-conventionsSkill
- github-pr-conventionsSkill
- github-repo-settingsSkill
- gitlab-ci-conventionsSkill
- helm-conventionsSkill
- herdr-core-delegationSkill
- herdr-delegationSkill
- herdr-tui-delegationSkill
- kopf-conventionsSkill
- kubernetes-operator-conventionsSkill
- logging-conventionsSkill
- logo-conventionsSkill
- mise-conventionsSkill
- ollama-conventionsSkill
- openssf-conventionsSkill
- pr-conventionsSkill
- pre-commit-conventionsSkill
- project-metadata-conventionsSkill
- python-async-conventionsSkill
- python-conventionsSkill
- readme-conventionsSkill
- release-script-conventionsSkill
- release-supply-chain-conventionsSkill
- renovate-ci-conventionsSkill
- rest-conventionsSkill
- rust-build-conventionsSkill
- rust-conventionsSkill
- rust-http-conventionsSkill
- security-policy-conventionsSkill
- signal-handling-conventionsSkill
- sql-conventionsSkill
- starlight-conventionsSkill
- systemd-conventionsSkill
- system-user-conventionsSkill
- task-conventionsSkill
- terraform-conventionsSkill
- topic-splittingSkill
- ui-copy-conventionsSkill
- web-layout-conventionsSkill
- yaml-conventionsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Mirrored registries: keep the *registry* in the cluster's values and the *path* beside the chart, then build the reference from the two.
- Distinctive: line 60
Always resolve the actual latest version before writing one: Never a version from memory, never "bump the patch and hope".
- Distinctive: line 71
Read the upstream release notes before bumping a major, and say in the PR what changed.
- Distinctive: line 255
Create it before the ApplicationSets that reference it — a sync wave on the AppProject, inside the root app's own sync, is a wave that does …
- Very specific: line 280
Never write an Application without revisionHistoryLimit: 0.
- Very specific: line 281
Never use a semver range in targetRevision, and never write a chart version from memory instead of looking up the latest.
- Very specific: line 283
Never prefix an OCI chart repoURL with oci:// in an Application.
- Very specific: line 284
Never glob an entry in sourceRepos.
- Very specific: line 285
Never give the $values source a path, and never point a source path at a directory that may not exist.
- Distinctive: line 287
Never rely on sync waves to order one Application against another.
- Very specific: line 289
Never add an automated sync block — nor reach for it to work around an app somebody keeps forgetting to sync.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Argo CD conventions
Rules about a single Argo CD object, which hold whatever shape the repository has.
Repository layout: the repository's own
Use the layout the repository already has — its directory names, its
templating, where its values live, how it onboards a cluster and switches an
app on. Do not challenge that structure: not in a comment, not in a "this
would be cleaner as…", not by quietly adding a lib/. A layout is
load-bearing for people and pipelines you cannot see, and a repository that is
half one shape and half another is worse than either. If the user wants a
refactor, they will ask.
The carve-out covers layout and structure only. The rules below apply to what you write, in the local idiom; do not sweep the repo to retrofit them. An existing choice that breaks a rule or is a genuine correctness problem is still said once, plainly, and proposed as its own change — then let go.
Charts: OCI first
Reference charts as OCI artefacts. An OCI registry is one artefact store
for charts and images, with one credential, one mirroring story and immutable
digests — an HTTP chart repository is a second protocol, a second credential
and an index.yaml that gets regenerated under you.
- Write the
repoURLwith no scheme:ghcr.io/<org>/charts, neveroci://ghcr.io/…. That is how Argo CD tells an OCI registry from an HTTP chart repository — it parses the URL and finds no host. (oci://is thehelmCLI's form, not theApplication's.) - The repository credential in Argo CD is
type: helmwithenableOCI: true. - An HTTP chart repository is a documented exception, not a fallback:
when upstream publishes no OCI chart at all. That reason goes beside the
line or in
ARCHITECTURE.md(seearchitecture-conventions); switching it to OCI once upstream publishes one is tracked in an issue. - Mirrored registries: keep the registry in the cluster's values and the path beside the chart, then build the reference from the two. The path is a fact about the chart, the registry a fact about where the cluster can reach. A registry that varies per cluster and is written once per chart is the wrong way round.
Chart versions: the latest, pinned exactly
Two rules that sound opposed and are not — freshness is a property of the moment you edit the version, never a runtime behaviour.
Always resolve the actual latest version before writing one. Never a version from memory, never "bump the patch and hope". Look it up:
helm show chart oci://<registry>/<path>/<chart> | grep '^version:'helm repo add <name> <url> && helm repo update && helm search repo <name>/<chart> --versions | headRead the upstream release notes before bumping a major, and say in the PR what changed. A chart version here is a dependency bump, never a release of this repository — but not one like any other: it is a change to every cluster at once.
- Pin the exact version. Never a range. Argo CD does accept a semver
constraint in
targetRevision(~1.2.0,*), and that is precisely the trap: the deployed version stops being in git, two clusters synced a week apart run different code, and a rollback is no longer a revert. If the version is not in the diff, nobody reviewed it. - Keep "latest" true over time with a bot, not a range — Renovate (a
custom manager over wherever versions live, or its
argocdmanager over plainApplicationYAML). A bumped pin arrives as a reviewable PR, which is the whole difference.
The Application
revisionHistoryLimit: 0, on every Application
Always. No exceptions, the bootstrap root app included. Argo CD keeps the
last ten syncs in status.history by default, and an entry there is not a
line: it carries the fully resolved source list, chart version and revision
included. That payload grows with how often an app is synced, on an object the
ApplicationSet controller rewrites on every reconcile.
What it costs is argocd app rollback and argocd app history, and that is
the right trade: git is the record of what was deployed, so a rollback is
a revert and a sync. Read the commit log, not the cluster.
(The chart-level revisionHistoryLimit — the one that caps ReplicaSets — is a
separate knob, set in the app's values file. Same reasoning, same answer.)
Sources
- A
$valuesref source takes nopath. With one it contributes manifests as well as values. - Argo CD fails an Application whose source
pathdoes not exist. For a directory that may be absent, pointpathat a parent that always exists and narrow withdirectory.include; matching nothing is legal and empty, missing is fatal. ignoreMissingValueFiles: trueis what lets an optional values file be optional — and it hides typos in those paths, which is what a render check exists for.directory.includeandexcludeglobs have no path separator: they match the path relative to the source'spath, and*crosses/. So*/*.yamlmatchesa/b/c.yamltoo; bound the depth with anexclude(*/*/*keeps only files one directory down).
Passing values into jsonnet
One extVar carrying a whole config object as JSON ({{ toJson .config }}),
decoded once with std.parseJson, rather than one extVar per key: the set
of goTemplate expressions that can reach a rendered Application stays small
enough to reproduce offline.
Pass it as a plain string, never code: true — code evaluates the value
as jsonnet, which turns a values file into an execution channel for nothing.
Sync policy
CreateNamespace=truewithmanagedNamespaceMetadatafor the labels other controllers select the namespace by. Two Applications sharing a namespace must write the same metadata, or they take turns rewriting each other's labels on every sync, forever.ServerSideApply=trueandServerSideDiff=trueby default, set once for every Application (the ApplicationSet template, or the value that feeds it) rather than repeated per app. Server-side apply is Kubernetes' apply mechanism since 1.22; it escapes the 262144-bytelast-applied-configurationannotation a client-side apply has to fit CRDs into, and with server-side diff the diff and the apply go through the same API-server computation, so admission defaults stop showing up as drift. Opt an app out only where it breaks — a resource synced withReplace=true, which wins over it, or a field that must disappear when the manifest drops it while another field manager co-owns it — and say why next to the opt-out.RespectIgnoreDifferences=truealongside anyignoreDifferences. Without it the ignore silences the report only: every sync still pushes the field, the other controller rewrites it, and the two managers fight forever.
No automated sync
No automated block. An app syncs when somebody asks it to.
Rendering stays continuous — a commit lands, Argo CD reports the app
OutOfSync, and the diff is there to read. Applying is the deliberate half.
It is the same argument as never automerging a dependency PR: a commit that
reaches every cluster without anyone pressing anything is a change to
production nobody read, and a green render is not a review — it proves the
manifests are valid, not that they are wanted.
State the cost rather than hiding it:
- Self-heal goes with it. A cluster patched by hand keeps the patch until the next sync, so drift is real and stays until someone syncs. That is the trade: drift you can see beats a change you did not.
- Pruning goes with it too, so a resource removed from git stays in the cluster until a sync with pruning on. Removal is deliberate, like everything else here.
- A sync that exhausts its retries is re-run by hand.
Turning it back on is one block, in the ApplicationSet template — say so in
ARCHITECTURE.md (see architecture-conventions), so nobody has to find it:
automated:
prune: true
selfHeal: trueThe one exception is a repo that already runs on automated sync. There, a single Application without it silently never deploys — the worst failure mode in the list. Match the repo and say once that it is off-convention.
ApplicationSets
goTemplate: truewithmissingkey=error. A missing key must fail the render, not resolve to empty and deploy something plausible.goTemplate: true goTemplateOptions: - missingkey=error- A matrix is a cartesian product, and it is silent. A child that yields nothing for one parameter set generates no Application there and reports nothing. Whatever a matrix reads, assert in CI that it exists where it must.
- A matrix combines exactly two children and nests one level deep. Three
generators are
matrix(matrix(a, b), c), and there is no room for a fourth. A child consuming a parameter comes after the one producing it. - A
pathParamPrefixon every git generator in a matrix, or theirpath.*parameters collide. Top-level keys of a file the git generator reads are never prefixed: keep them under one root (config:), or a barename:ormetadata:shadows the clusters generator's own. Give the clusters generator a selector. With none, Argo CD adds a synthesised
in-clusterentry that carries no.metadata.labels, which tripsmissingkey=erroron any template reading them. This selector names what every cluster Secret carries and nothing else:selector: matchLabels: argocd.argoproj.io/secret-type: clustersyncPolicy.applicationsSync: sync, withpreserveResourcesOnDeletion: true. The controller owns the Application objects — one that stops being generated goes, rather than lingering as a permanently broken app pointing at configuration that no longer exists — and the workloads underneath it stay. Deleting what is running is a separate, deliberate act, like every other apply here.- No value of
applicationsSyncsurvives deleting the ApplicationSet itself. The generated Applications carry an ownerReference, so Kubernetes cascades regardless —create-updatereads like protection and gives none here.preserveResourcesOnDeletionis what stands between a fat-fingeredkubectl delete appsetand every workload it generated. - Name the Application from
{{ .nameNormalized }}, not{{ .name }}— a cluster name is free text, an object name is not.
Ordering
Sync waves order resources inside one Application. They do nothing between Applications — two generated by different ApplicationSets have no ordering relationship at all, whatever their waves say.
Cross-app ordering is convergence by retry: a resource that lands before its CRD fails, backs off, and succeeds within the same sync operation. Give every Application a retry policy with real headroom rather than trying to sequence apps:
retry:
limit: 10
backoff:
duration: 15s
factor: 2
maxDuration: 5mThe AppProject
sourceReposis an allowlist — list the registries, never glob them.*/org/chartspermits that path under any host in the world, so a typo in a cluster's registry pulls a chart from wherever the typo resolves and reports nothing. Listed, the same typo is an Application Argo CD refuses by name.- Create it before the ApplicationSets that reference it — a sync wave on the AppProject, inside the root app's own sync, is a wave that does something.
The bootstrap root app
One Application, applied once by hand, that renders the directory it lives
in — so a change to it goes out with a sync rather than waiting for somebody
to remember the command.
- It renders only manifests:
directory.recurse: false, or a recursive source whoseinclude/excludepin exactly the files it owns — anything else treats every values file below it as a manifest. argocd.argoproj.io/sync-options: Prune=falseon the root itself. A rename or a bad merge that removes this file is otherwise a root app that prunes itself out of existence, taking the AppProject and every ApplicationSet with it via the finalizer.- It runs in the
defaultproject: an AppProject it generates cannot be its own prerequisite. in-clusteris named here and nowhere else — it is applied before any cluster Secret exists, and Argo CD resolves that name from a built-in special case.
Never:
- Never write an
ApplicationwithoutrevisionHistoryLimit: 0. - Never use a semver range in
targetRevision, and never write a chart version from memory instead of looking up the latest. - Never prefix an OCI chart
repoURLwithoci://in anApplication. - Never glob an entry in
sourceRepos. - Never give the
$valuessource apath, and never point a sourcepathat a directory that may not exist. - Never rely on sync waves to order one Application against another.
- Never write an
ApplicationSetwithoutpreserveResourcesOnDeletion: true. - Never add an
automatedsync block — nor reach for it to work around an app somebody keeps forgetting to sync.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

