/devops:traefik-controller-decommissionfrom devops
Plans a GitOps-safe decommission of ingress-nginx in a Kustomize + ArgoCD repo. Verifies no Ingress uses nginx class, archives the Kustomize module, disables the ArgoCD Application, and waits for prune. Plan-only: emits commands.sh for manual execution.
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 *decommission-nginx. GitOps companion to
*install-traefik — both manipulate the Kustomize modules ArgoCD
reconciles, never the live cluster directly.
helm uninstall runner — ArgoCD prunes resources when the
Application is disabled or deleted.kubectl delete runner — same reason.| File | When to read |
|---|---|
references/decommission-checklist.md | Step 6 — operator-facing manual checklist (final cluster verifications + rollback recipe) |
| Script | Used by | Purpose |
|---|---|---|
scripts/verify_no_nginx_class.sh | Step 3 | Dual cluster + repo scan (precedence-aware: spec.ingressClassName == "nginx" OR null-spec + legacy annotation). Unchanged from v1.12.0; this was already GitOps-correct. |
scripts/discover_nginx_module.sh | Step 1 | Scan common.*/ for the Kustomize module hosting the ingress-nginx Helm chart; identify its ArgoCD Application manifest. |
scripts/generate_decommission_plan.sh | Step 5 | Render plan.md + commands.sh for archive + ArgoCD disable + post-prune verify + optional LB/IAM cleanup. |
Triggered explicitly by *decommission-nginx from Zeus. Not auto-triggered.
*decommission-nginx # interactive
*decommission-nginx --cycle prod-batch-3 # named migration cycle
*decommission-nginx --skip-dns-bake # NEEDS_REVIEW verdict; not recommended
*decommission-nginx --no-lb-cleanup # skip Step 5b LB IP release plan
*decommission-nginx --resume <state-path> # continue from state.yaml
docs/reports/traefik-controller-decommission/<date>/
state.yaml # machine-readable state
verify.json # raw cluster + repo scan results
plan.md # operator-readable plan
commands.sh # copy-paste-ready (NEVER auto-executed)
| Step | Action | Script |
|---|---|---|
| 0 | Tool check (kustomize, yq, git, jq; kubectl, gcloud optional with WARN) | inline command -v |
| 1 | Discover ingress-nginx Kustomize module + ArgoCD Application path | discover_nginx_module.sh |
| 2 | Operator inputs (date, operator, cycle, optional GCP project for LB cleanup) | inline |
| 3 | Verify zero active nginx Ingresses (cluster + repo) | verify_no_nginx_class.sh --all |
| 4 | DNS bake-period confirmation | inline interactive prompt |
| 5 | Generate decommission plan + commands.sh | generate_decommission_plan.sh |
| 6 | Render state.yaml + print verdict + next-step instructions | inline |
Required: kustomize, yq, git, jq. WARN-only: kubectl, gcloud
(used to render fuller plans but the skill works offline without them).
Invoke scripts/discover_nginx_module.sh --repo-root .. The script:
kustomization.yaml for helmCharts: blocks naming
ingress-nginx.argocd/*.yaml files (ArgoCD Application manifests
pointing at the module).HALT if zero modules match (nothing to decommission) or more than one
matches (ambiguous — operator must pick via --module <path> override).
Three prompts:
git config user.email)Optional:
--no-lb-cleanup.Invoke verify_no_nginx_class.sh --all. Two scans:
kubectl get ingress -A (skipped if kubectl missing — WARN
records degraded state).kustomize build every common.*/overlays/<env>/ and extract
Ingresses with spec.ingressClassName == "nginx" OR
(spec.ingressClassName == null AND
kubernetes.io/ingress.class == "nginx").Exit codes:
BLOCKED → HALT with the list of offending Ingresses. commands.sh NOT
written. The operator either re-migrates the leftover or deletes the
stale Ingress before retrying.
Interactive:
Did the DNS cutover for <cycle> happen at least 72h ago?
Has every monitored hostname returned HTTP 200 via the Traefik LB during
that window with zero traffic on the nginx LB?
[yes/no]
Any answer other than yes → BLOCKED. Use --skip-dns-bake to bypass
(verdict becomes NEEDS_REVIEW so the operator records the override).
Invoke scripts/generate_decommission_plan.sh with env vars:
NGINX_MODULE — path from Step 1 (e.g. common.ingress-nginx)ARGOCD_APP_MANIFESTS — comma-separated list of ArgoCD app YAML pathsNGINX_NAMESPACE — destination namespace from Step 1GCP_PROJECT — for LB IP release plan (or <TODO> placeholder)REPORT_DIR — absolute path to the report directoryThe script renders three sections into plan.md and a
copy-paste-ready commands.sh:
# Make sure we're on the deployment branch
git checkout main && git pull
# Move the entire ingress-nginx module under archive/
git mv common.ingress-nginx/ archive/
# Commit and push (ArgoCD will see the deleted resources and prune them)
git commit -m "chore(ingress-nginx): archive controller module for decommission"
git push
# For each env (dev → stg → prd or operator's preferred order):
for env in dev stg prd; do
# Disable auto-sync so ArgoCD doesn't try to recreate
kubectl patch application <nginx-app-name> -n argocd --type merge \
-p '{"spec":{"syncPolicy":{"automated":null}}}'
# Trigger explicit prune. This deletes the Deployment, Service, RBAC,
# ServiceAccount, Helm Secret, etc. via ArgoCD's pruner.
kubectl patch application <nginx-app-name> -n argocd --type merge \
-p '{"operation":{"sync":{"prune":true,"force":true}}}'
# Wait for prune to finish
kubectl wait application <nginx-app-name> -n argocd \
--for=condition=Healthy=False --timeout=5m || true
# Finally remove the Application manifest itself
kubectl delete -f common.ingress-nginx/argocd/$env.yaml
done
# Verify zero resources remain in the controller namespace
kubectl get all -n <nginx-namespace>
# Then optionally drop the namespace once empty
kubectl delete namespace <nginx-namespace>
Same as the v1.0.0 Horus-flavored plan: gcloud compute addresses list + delete after confirming no forwarding rule references the IP;
SA enumeration + binding cleanup. Skipped if --no-lb-cleanup.
Write state.yaml, verify.json. Print verdict + next-step
instructions:
1. Read docs/reports/traefik-controller-decommission/<date>/plan.md
2. Execute commands.sh block-by-block (not in one shot)
3. Commit the report directory once decommission is complete
schemaVersion: 1
skillVersion: "2.0.0"
runId: <ulid>
createdAt: <iso>
inputs:
date: 2026-05-19
operator: alex.hsieh
migrationCycle: prod-batch-3
gcpProject: awoo-prod
discovery:
nginxModule: common.ingress-nginx
argocdAppManifests: [common.ingress-nginx/argocd/dev.yaml, ...]
nginxNamespace: ingress-nginx
helmChartVersion: 4.10.0 # informational
verification:
activeNginxIngresses:
cluster: []
repo: []
dnsBakeConfirmed:
confirmed: true
confirmedBy: alex.hsieh
confirmedAt: 2026-05-19T10:14:00Z
plan:
archive:
sourcePath: common.ingress-nginx
targetPath: archive/common.ingress-nginx
argocdDisable:
apps: [...]
namespace: argocd
lbRelease: # null if --no-lb-cleanup
nginxLbIp: 34.x.x.x
verdict: READY | BLOCKED | NEEDS_REVIEW | DEGRADED
| Step | Halt cause |
|---|---|
| 0 | Required tool missing |
| 1 | Zero ingress-nginx modules found OR more than one (ambiguous) |
| 3 | Active nginx Ingress in cluster OR repo |
| 4 | Operator declines DNS bake confirmation (without --skip-dns-bake) |
Same four invariants as ingress-controller-install (its sibling
skill): never run helm uninstall / kubectl delete directly, only
edit the common.ingress-nginx/ module, full-file backups before any
edit, plan-only output.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub qwedsazxc78/devops-ai-skill --plugin devops12 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-controller-installGitOps-flavored Traefik Ingress Controller bootstrap, env addition, or chart upgrade in a Kustomize + ArgoCD repo. Operates exclusively on files under `common.traefik/` (base, overlays, argocd manifests). Never runs `helm install` or `helm upgrade` — those are ArgoCD's job. Plan-only: edits Kustomize files, emits the `git add` / commit / push commands, and the operator drives git. Validates coexistence with `ingress-nginx` via Kustomize-build inspection (no live cluster required). Use for new-cluster bootstrap, adding a new env overlay, or bumping the Traefik chart version.
/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.
Other plugins' skills for the same job