fix(ci): pin the kind node image in the Kyverno admission smoke - #85
Merged
Conversation
scripts/test_kyverno_admission.sh called `kind create cluster` with no --image, so the Kubernetes version the shipped ClusterPolicies were proven against was whatever the kind binary happened to bundle. That version moves with every helm/kind-action bump, which means a routine dependency PR could silently change the platform the admission contract is validated on, and the smoke would still report green. Surfaced while reviewing #81 (kind-action 1.14.0 -> 1.15.0), whose release notes carry `chore: bump default kind and kubectl`. golden-path.yml and golden-path-extended.yml were unaffected because they pass an explicit node_image; this script was the one place that did not. Pinned to kindest/node:v1.30.0 via KIND_NODE_IMAGE — the same image KIND_IMAGE pins in both golden-path workflows, so admission and end-to-end now exercise one platform. Overridable by environment variable, matching the existing KYVERNO_VERSION idiom in the same file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DuqueOM
force-pushed
the
fix/pin-kind-node-image
branch
from
September 4, 2026 17:38
4ecafc9 to
24cd37d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the second of the two points.
The defect
scripts/test_kyverno_admission.sh:54called:No
--image. So the Kubernetes version the shipped ClusterPolicies are proven against was whatever the kind binary happened to bundle at that moment — and that version moves with everyhelm/kind-actionbump.The consequence is specific: a routine dependency PR can change the platform the admission contract is validated on, and the smoke still reports green. The script is careful about everything else —
KYVERNO_VERSIONis pinned and overridable, the policy file path is asserted, the cluster is torn down on trap — which makes the one unpinned input easy to miss.How it surfaced
While reviewing #81 (
helm/kind-action1.14.0 → 1.15.0). Its release notes carrychore: bump default kind and kubectl— a change to the action's default node image.golden-path.ymlandgolden-path-extended.ymlwere unaffected: both passnode_image: ${{ env.KIND_IMAGE }}, pinned tokindest/node:v1.30.0.kyverno-smoke.ymlcalls the action withinstall_only: true, so it never asks the action for a cluster at all — it just installs the binary and hands off to this script, which is where the unpinnedkind create clusterlives. That is why the gap survived: the pin was present in the two places people look, and absent in the one place that actually creates the cluster the policies are tested on.The fix
Same image the golden-path workflows pin, so admission and end-to-end now exercise one platform rather than two that drift apart. Overridable by environment variable, matching the
KYVERNO_VERSIONidiom already in the file, so testing a policy against a newer Kubernetes stays a one-line override rather than an edit.Verification
kyverno-smoke.ymlfilters onpaths:and listsscripts/test_kyverno_admission.sh, so this PR triggers the smoke it changes — the admission test runs end to end against the newly pinned image rather than merging untested.🤖 Generated with Claude Code