Pin helm capabilities version to the validation target #472
Reference in New Issue
Block a user
Delete Branch "benvin/kubeconform-helm-kubeversion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Helm renders charts using its own binary default for Capabilities.KubeVersion, which is now v1.36 locally. The rancher 2.13.1 chart constrains kubeVersion to < 1.35.0-0, so
kustomize build --enable-helmfailed on apps/overlays/au-syd1/cattle-system and, being the first failure under set -e, masked every later overlay.AGENTS.md:218—Current Kubernetes target version: **1.33.7**is a second hardcoded copy of the value the PR just made a single source → replace the literal with a pointer toci/kube-version.AGENTS.md:25,28,121,migration.md:52,53— the documented render commands are still barekustomize build --enable-helm <overlay>, so following the docs reproduces the exact cattle-system kubeVersion failure this PR fixes → add--helm-kube-version(or point them atmake build).Makefile:3—$(shell cat ci/kube-version)is cwd-relative and unguarded; if it cannot be read,KUBE_VERSIONis empty and the target path is consumed as the flag value (--helm-kube-version clusters/au-syd1/bootstrap --output ...), so kustomize silently builds.instead of erroring → resolve via the makefile dir and fail on empty.ci/validate-apps.sh:4-5,ci/validate-clusters.sh:4-5—REPO_ROOTanchors only the version file;SCHEMA_DIR=schemas(line 7) andfind apps/overlays/find clusters(line 26) are still cwd-relative, so the scripts still only work from the repo root → anchor all of them or dropREPO_ROOTand justcat ci/kube-version.ci/kube-version:1—1.33.7, but the live cluster servesv1.33.13and ArgoCD renders kustomize+helm with the destination cluster version, so CI validates a differentCapabilities.KubeVersionthan the deploy path → sync to the running version.ci/validate-apps.sh:14-26— the masking called out in the PR body is untouched;set -estill aborts the loop on the first failing overlay → collect failures and exit non-zero at the end if that behaviour was meant to go.Makefile:3-4— anchoring onlyci/kube-versiontoMAKEFILE_DIRleaves every other path in the file cwd-relative (ci/validate-apps.sh/ci/validate-clusters.shL21-22,ci/generate-schemas.shL17,manifests/L12), somake -f /path/to/Makefile kubeconformfrom another directory now reads the version fine and then dies withci/validate-apps.sh: No such file or directory→ anchor those paths toMAKEFILE_DIRtoo, or drop it and keep the Makefile repo-root-only like the ci scripts.Makefile:5-7— the guard is a parse-time$(error), so it also aborts targets that never need the version (make clean,make schemas) → move the check into thebuildrecipe.4a66973653to004343437aView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.