/devops:kustomize-resource-validationfrom devops
Validates Kustomize configurations when kustomization.yaml is edited: checks resource/patch references, orphaned files, cross-environment consistency, build success, and generator configs.
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.
None: SKILL.md is the whole skill.
Automatically activates when any kustomization.yaml file is edited.
Trigger: Any file named kustomization.yaml inside a Kustomize module directory (any directory containing base/ and overlays/ structure) is created or edited.
Scope: This applies to both base and overlay kustomization.yaml files.
After the user edits a kustomization.yaml, perform these validations in order. Use the file system tools (Glob, Read) to verify references -- do not guess.
For every entry in the resources: list, verify the target exists:
../../base): Resolve the relative path from the kustomization.yaml location and confirm the directory exists and contains its own kustomization.yaml.gitlab-runner-secret.yaml): Confirm the file exists in the same directory as the kustomization.yaml.Report missing references as FAIL.
For every entry in the patches: list that uses a path: key, verify:
kustomization.yaml directory.apiVersion, kind, and metadata fields).Report missing or malformed patches as FAIL.
List all .yaml files in the same directory as the kustomization.yaml, then check whether each file is referenced as a resources entry or a patches path entry.
Exclude from orphan detection:
kustomization.yaml itselfenv/ subdirectory (used by secretGenerator)*.envReport unreferenced files as WARN with the message:
WARNING:
<filename>exists in<directory>/but is not referenced inkustomization.yaml. It may be orphaned.
This check only applies when the edited file is in an overlay directory (e.g., overlays/dev/kustomization.yaml).
Discover sibling environments by listing subdirectories under the overlays/ parent directory. Compare the resources: and patches: lists across all discovered sibling environments. Report differences as WARN -- not FAIL, since environment-specific resources are sometimes intentional.
Example warning format:
WARNING:
overlays/dev/kustomization.yamlincludes patchairflow-sa-patch.yamlwhich is absent fromoverlays/stg/andoverlays/prd/. Verify this is intentional.
Determine the Kustomize module from the file path (the nearest ancestor directory containing both base/ and overlays/).
kustomize build for that specific environment only.overlays/ and run kustomize build for each.kustomize build <module>/overlays/<env>
Report build failures as FAIL with the error output.
If secretGenerator or configMapGenerator entries exist in the edited file, verify:
envs file paths exist relative to the kustomization.yaml directory.files paths exist relative to the kustomization.yaml directory.namespace.generatorOptions.disableNameSuffixHash: true, check it is set. If missing, warn:WARNING:
generatorOptions.disableNameSuffixHashis not set totrue. Consider settingdisableNameSuffixHash: trueat the top level of kustomization.yaml to maintain consistent resource names.
Kustomize module conventions to detect:
namePrefix in overlays, verify namePrefix is set and matches the environment directory name (e.g., dev-, stg-, prd-).namePrefix, do not flag its absence.Always show the validation summary table, regardless of whether issues are found.
Kustomize Validation: <path/to/kustomization.yaml>
| # | Check | Status | Details |
|---|------------------------|--------|--------------------------------------|
| 1 | Resources | PASS | 5 resources, 0 missing |
| 2 | Patches | PASS | 3 patches, 0 missing |
| 3 | Orphaned Files | WARN | 1 orphaned: unused-config.yaml |
| 4 | Cross-Env Consistency | OK | Consistent across all environments |
| 5 | Build (<env>) | PASS | Build succeeded |
| 6 | Generators | PASS | 2 secretGenerators, all refs valid |
If there are errors or warnings, list them after the table:
Errors:
- [#1 Resources] File `missing-secret.yaml` not found in overlays/dev/
Warnings:
- [#3 Orphaned] `unused-config.yaml` is not referenced in kustomization.yaml
- [#4 Cross-Env] Patch `extra-patch.yaml` exists only in dev overlay
If all checks pass with no warnings, end with: "All checks passed. No issues found."
For each entry in the patches: list, verify that the patch targets a resource that actually exists in the build:
apiVersion, kind, and metadata.nameresources: list and extract their apiVersion, kind, and metadata.nameWARNING: Patch
<patch-file>targets<kind>/<name>but no matching resource found inresources:. The patch may apply to a resource from a base directory.
op field), verify the patch structure matches the target resource's structureop: add/remove/replace), verify the path exists in the target resourceThis check reduces the risk of patches silently doing nothing because their target was renamed or removed.
kustomize not installed: Skip Check 5 (build validation). Report as SKIP with install command: brew install kustomize. All other checks (1-4, 6) work with file reading only.kustomize build fails: Report the error output as FAIL in Check 5. Continue with Check 6.kustomize build times out (> 30s): Kill the process, report as FAIL with timeout message.resources: [https://...]): Skip existence check, note as INFO that remote resources can't be validated offline.helmCharts: section exists, note it as INFO — these are validated by Helm, not Kustomize.After all checks complete, write the full validation report to the repository's docs/reports/ directory.
docs/reports/kustomize-validation-<YYYY-MM-DD>.md
YYYY-MM-DD format.docs/reports/ if it does not exist (use mkdir -p).The written report must include:
git rev-parse --abbrev-ref HEAD), and trigger file path.# Kustomize Validation Report
**Repository:** <repo-root-directory-name>
**Date:** <YYYY-MM-DD>
**Branch:** <current-branch>
**Triggered by:** <path/to/kustomization.yaml>
This skill is read-only by default — validation doesn't modify files. All checks use Glob/Read to verify references. The only command that has side effects is kustomize build, which writes to stdout only. The Report Persistence step is the sole exception — it writes one Markdown file to docs/reports/.
No rollback needed — this skill only reads and reports. The only file written is the Markdown report under docs/reports/, which can be safely deleted.
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.
/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.
Other plugins' skills for the same job