/devops:ingress-controller-installfrom devops
Bootstraps, adds environments, or upgrades Traefik Ingress Controller via Kustomize + ArgoCD. Edits repo files under `common.traefik/` and emits git commands — never touches the live cluster.
Ships in devops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Invoked by Zeus pipeline *install-traefik. This is the GitOps companion
to *decommission-nginx — both manipulate the common.*/ Kustomize
modules ArgoCD reconciles, never the live cluster directly.
helm install / helm upgrade runner — those would conflict
with ArgoCD reconciling the same release.common.traefik/.kubectl apply -f common.traefik/argocd/<env>.yaml after committing.The skill auto-detects which of three modes applies, based on repo state:
| Mode | Trigger | Action |
|---|---|---|
bootstrap | common.traefik/ does not exist | Scaffold the whole module from references/traefik-module-template.yaml |
new-env | common.traefik/base/ exists, overlays/<target-env>/ does not | Copy overlays/dev/ → overlays/<target-env>/, prompt operator for env-specific overrides |
upgrade | common.traefik/overlays/<target-env>/ exists | Bump the Traefik chart version: in base/kustomization.yaml AND every overlays/*/kustomization.yaml, idempotent |
Override the detected mode with --mode <bootstrap|new-env|upgrade>.
| File | When to read |
|---|---|
references/coexistence-checklist.md | Step 3 — pre-commit checks for IngressClass / LB IP / port collision (read-only, Kustomize-build inspection) |
references/values-template.yaml | Step 2 (bootstrap) — embedded into base/app.values.yaml |
references/traefik-module-template.yaml | Step 2 (bootstrap) — Kustomize scaffolding skeleton (kustomization.yaml + base + overlays + argocd) |
| Script | Used by | Purpose |
|---|---|---|
scripts/detect_mode.sh | Step 1 | Inspect repo, decide between bootstrap / new-env / upgrade |
scripts/validate_coexistence_kustomize.sh | Step 3 | Build the planned overlay AND any existing nginx overlay; verify no class / port / LB collision |
scripts/upgrade_chart_version.sh | Step 4 (upgrade mode) | Atomic version bump across base + all overlays + pre-commit consistency check |
Triggered explicitly by *install-traefik from Zeus. Not auto-triggered.
*install-traefik # interactive: detect mode, prompt as needed
*install-traefik --env dev # explicit target env
*install-traefik --env prd --mode new-env # force new-env mode
*install-traefik --upgrade-to 40.1.0 # upgrade chart version on every overlay
*install-traefik --resume <state-path> # continue from state.yaml
docs/reports/ingress-controller-install/<isodate>/
state.yaml # machine-readable plan + verdict
plan.md # operator-readable summary + commit message + git commands
diff.patch # unified diff of all proposed file edits (pre-commit preview)
The skill edits files in place under common.traefik/. Before any
edit it writes a backup to docs/reports/.../backups/ (full file
content, not a diff — matches the safety pattern from
gateway-api-migration). On kustomize build failure post-edit, the
backup is restored automatically.
| Step | Action | Script |
|---|---|---|
| 0 | Tool check (kustomize, yq, git) | inline command -v |
| 1 | Detect mode + target env | detect_mode.sh |
| 2 | Branch on mode: scaffold OR copy-env OR identify upgrade scope | inline |
| 3 | Validate coexistence (read-only Kustomize-build inspection) | validate_coexistence_kustomize.sh |
| 4 | Apply edits to common.traefik/, with backups | upgrade_chart_version.sh (upgrade) or inline (bootstrap / new-env) |
| 5 | kustomize build the target overlay; rollback from backups on failure | inline |
| 6 | Render plan.md + diff.patch; print git commands | inline |
Run command -v kustomize yq git. HALT on any missing.
Invoke scripts/detect_mode.sh --repo-root . --target-env <env>. The
script returns JSON:
{
"mode": "bootstrap" | "new-env" | "upgrade",
"moduleExists": true,
"baseExists": true,
"targetEnvExists": false,
"existingOverlays": ["dev", "stg", "prd"],
"currentChartVersion": "39.0.8"
}
If --mode is explicit, the script validates it's compatible with the
detected state (e.g., refuses to bootstrap if common.traefik/ already
exists, unless --force is passed).
bootstrap: Read references/traefik-module-template.yaml,
substitute env names, write to common.traefik/{base,overlays/<env>,argocd}/.
Read references/values-template.yaml and write to
common.traefik/base/app.values.yaml. The values file is parameterized
on ${INGRESS_CLASS_NAME} (default traefik), ${LB_IP} (operator
must supply — never derive from cluster), and ${GATEWAY_API_ENABLED}
(default false).
new-env: cp -r common.traefik/overlays/<source-env>/ common.traefik/overlays/<target-env>/
where <source-env> defaults to dev. Prompt operator for env-specific
overrides (LB IP, log level, replica count). Apply substitutions.
upgrade: No file structure changes; only version bumps in Step 4.
Invoke scripts/validate_coexistence_kustomize.sh --target-env <env>.
The script does read-only Kustomize-build inspection — no live cluster queries:
| Check | How |
|---|---|
classCollision | Run kustomize build on the target overlay + every other common.*/overlays/<env>/. Extract every IngressClass and every kubernetes.io/ingress.class / spec.ingressClassName. The proposed Traefik class must not appear in any other module's built output (unless mode is upgrade — then collision against the existing Traefik class is expected). |
lbIpCollision | Grep loadBalancerIP: and kubernetes.io/load-balancer-source-ranges annotations across all module builds. Proposed IP must not appear elsewhere. |
portCollision | For Services with type: LoadBalancer, port 80/443 must not be claimed by a non-Traefik release in the target namespace. |
On any collision: HALT with verdict BLOCKED. Plan files NOT written.
bootstrap and new-env: write the planned files directly.
upgrade: invoke scripts/upgrade_chart_version.sh --target <version>.
The script:
base/kustomization.yaml + all overlays/*/kustomization.yaml.helmCharts[0].version in each (idempotent via yq -i).traefik-version-consistency pre-commit hook in the consumer
repo will enforce this, but the skill catches it first).kustomize build common.traefik/overlays/<target-env> > /tmp/built.yaml
If exit != 0: restore all backups from
docs/reports/.../backups/, mark verdict FAIL, HALT with the
kustomize stderr. The repo is left identical to its pre-skill state.
Write plan.md with:
git add common.traefik/ # or specific files
git commit -m "feat(traefik): bootstrap controller for <env>"
git push
kubectl apply -f common.traefik/argocd/<env>.yaml # only for bootstrap / new-env
Also write diff.patch (full unified diff) so the operator can preview
exactly what changed before staging.
The skill never auto-commits. Operator drives git.
schemaVersion: 1
skillVersion: "2.0.0"
runId: <ulid>
createdAt: <iso>
inputs:
targetEnv: dev | stg | prd | <custom>
mode: bootstrap | new-env | upgrade | auto
upgradeTo: "<chart-version>" | null
ingressClassName: traefik
lbIp: "<operator-supplied>"
gatewayApiEnabled: false
detection:
moduleExists: true
baseExists: true
targetEnvExists: false
existingOverlays: [dev, stg, prd]
currentChartVersion: "39.0.8"
validation:
classCollision: false
lbIpCollision: false
portCollision: false
details: {}
plan:
mode: upgrade
filesCreated: []
filesModified:
- {path: common.traefik/base/kustomization.yaml, backup: "...", sha256Before: "...", sha256After: "..."}
filesUnchanged: []
commitMessage: "chore(traefik): upgrade chart 39.0.8 → 40.1.0"
gitCommands: [...]
postApplyCommands:
- "kubectl apply -f common.traefik/argocd/dev.yaml"
verdict: READY | BLOCKED | NEEDS_REVIEW
reportPath: docs/reports/ingress-controller-install/<slug>/plan.md
| Step | Halt cause |
|---|---|
| 0 | Required tool missing |
| 1 | Mode mismatch (e.g., --mode bootstrap but common.traefik/ exists), no --force |
| 3 | Class / LB IP / port collision |
| 5 | kustomize build fails post-edit (backups restored automatically) |
Four invariants:
helm install / helm upgrade directly. The
HelmChartInflationGenerator embedded in
common.traefik/overlays/<env>/kustomization.yaml is the source of
truth. ArgoCD applies the rendered manifests when the operator
commits.kubectl apply directly. The skill prints the
kubectl apply -f common.traefik/argocd/<env>.yaml command but does
not execute it.common.traefik/. No other module is touched.
Coexistence validation reads but never writes other modules.kustomize build failure
post-edit, the backup is restored. Failure mode is "repo unchanged",
not "repo half-edited".What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/gateway-api-migrationMigrates Kustomize modules using NGINX Ingress to Gateway API resources. Dual-target: default Traefik (GatewayClass=traefik), opt-in GKE Gateway (--gateway-class gke-l7-global-external-managed). Handles master/minion topology (common.ingress/ + common.service/) as the primary case, with standalone Ingress as a fallback. Performs cluster-side preflight (CRDs, GatewayClass, policy CRDs, Traefik version probe on Traefik targets), deterministic discovery/analysis via bundled scripts, two-phase conversion with atomic rollback from full file backups, semantic diff of path and listener coverage, plus an ingress2gateway second-opinion cross-check. Renders a comprehensive report covering per-hostname mapping, TLS map, annotation inventory (translated/stubbed/unknown), risk register, cutover checklist, verification commands, and rollback procedures. Never modifies the master source; performs idempotent in-place edits only to common.service/overlays/<env>/kustomization.yaml.
/helm-version-upgradeManages Helm chart version upgrades across Terraform+Helm platforms. Handles atomic 3-file updates with version discovery from ArtifactHub. Use when upgrading Helm charts, checking for outdated versions, or performing version consistency checks.
/ingress-migration-advisorRead-only planner that inventories every Ingress in a Kustomize repo, scores each service on five migration-readiness dimensions, and recommends one of four paths per service (direct-gateway, two-step, swap-only, defer). Output is a Mermaid Gantt plan plus ready-to-paste Zeus commands. Critical traffic-tier services are vetoed to defer. Services already on Traefik Ingress (sourceClass=traefik) auto-route to direct-gateway. Never mutates the repo; produces docs/reports/ ingress-migration-advisor/<slug>/plan.md and state.yaml. Use for end-of-life planning (ingress-nginx EOL 2025), migration sequencing, or per-service path advisory. Requires docs/ingress-tier-map.yaml in the consumer repo.
/kustomize-resource-validationAuto-trigger skill that activates when any kustomization.yaml file is edited. Validates resource references, patch references, orphaned files, cross-environment consistency, build success, and generator configurations.
/retire-nginxRetire the nginx ingress controller and all nginx Ingress resources from a Kustomize + ArgoCD repo after Gateway API / Traefik migration is complete. Supports single-env (dev/stg/prd) or all-envs retirement in one command. Use this skill whenever: removing nginx after migration, cleaning up dead nginx Ingress resources from a kustomize base, decommissioning the ingress-nginx controller ArgoCD Application for an env, or retiring nginx from one environment without touching others. Safety-gated: aborts if no HTTPRoutes/Traefik Ingresses found (migration not done). Uses $patch: delete in the service overlay kustomization to exclude base nginx Ingress resources per-env — base files stay intact for other envs still using them.
/nginx-to-gatewayThin orchestrator that chains nginx-to-traefik (class swap) and gateway-api-migration (resource swap) against one Kustomize module in one operator session. Owns no conversion logic. Invokes skill A first, reads its outputs.traefikIngresses[] hand-off contract, then invokes skill B with --source-class traefik --no-redirect and the chosen --gateway-class. Produces a single combined index document linking both sub-reports. Each phase keeps its own state file; this skill records the chain in docs/reports/nginx-to-gateway/<slug>/index.yaml.
npx claudepluginhub qwedsazxc78/devops-ai-skill --plugin devopsOther plugins' skills for the same job