Flux + ConfigHub Agent Instructions
This repository is reconciled by Flux and tracked by ConfigHub. Use each tool for the half it owns, never mix their responsibilities or bypass production approval.
Division of labor
| Question or task | Use | Examples |
|---|---|---|
| Live cluster reconciliation, health, events, suspend/resume | Flux CLI or Flux MCP server (flux-operator-mcp) | flux get kustomizations -A, flux get helmreleases -A, flux diff kustomization orders |
What this repo deploys, which folder maps to which Kustomization or HelmRelease, orphaned manifests | ConfigHub plugin (read-only, no hub or cluster access needed) | /confighub:inventory, confighub mini inventory . |
| Why a value was changed, cross-env diff, change history across sessions | ConfigHub plugin or local/shared hub | /confighub:why KEY, /confighub:changes, cub mini changes --why KEY |
| Staging edits & human-gated production releases (Kustomize repos) | ConfigHub hub (kustomize-flux starter) | cub mini upload APP --component APP --change-desc "WHY" |
Rules for coding agents
- Start read-only. Before proposing any edit in a Flux repo, run
/confighub:inventory(orconfighub mini inventory .) to map everyKustomization,HelmRelease, andflux-systemfolder, and check Flux status (flux get all -Aor Flux MCP) if a cluster context is active. Respect the
HelmReleasevs. Kustomize boundary.- For
HelmRelease-heavy repos, use ConfigHub read-only (inventory, values diff across environments, PR review comments) and keep Flux reconciling from Git. Do not propose switching aHelmReleasepipeline to rendered OCI delivery unless the person explicitly asks to migrate away from Helm releases. - For Kustomize repos, you may adopt with the
kustomize-fluxstarter and propose changes viacub mini uploadwith a clear--change-desc.
- For
- Never write directly to production clusters. Do not run
kubectl apply,kubectl patch,flux reconcileon production to force an unapproved manifest, orcub mini approve/cub mini deploy-from-hub. Always leave the printedcub mini approve BASE/ORDERcommand for the human owner. - Always state why. Every config edit or
cub mini uploadmust include the business or operational reason so the next agent or on-call engineer can trace the change without digging through old chats.