Skip to content

fix(kubeadm): include kubelet JSON patches in phase checksum#2

Open
gfariasalves-ionos wants to merge 1 commit into
masterfrom
mk8s/fix-kubelet-jsonpatch-checksum
Open

fix(kubeadm): include kubelet JSON patches in phase checksum#2
gfariasalves-ionos wants to merge 1 commit into
masterfrom
mk8s/fix-kubelet-jsonpatch-checksum

Conversation

@gfariasalves-ionos

Copy link
Copy Markdown

Problem

KubeadmPhaseCreate caches the result of upload-config-kubelet behind Configuration.Checksum(), which did not depend on spec.kubernetes.kubelet.configurationJSONPatches. So changes to the patches after TCP initialization left the cached phase status matching → the upload-config-kubelet phase short-circuited → the tenant's kubelet-config ConfigMap was never re-uploaded.

This is what blocked our per-pool kubelet patch changes from ever taking effect on running tenant control planes (1.34→1.35 node-join testing).

Fix

Thread the patch payload into Configuration.KubeletPatches and fold it into Checksum(), so any change to the JSON patches invalidates the cached status and forces a re-upload on the next reconcile. Adds a unit test guarding the regression.

Testing

  • go test ./internal/kubeadm/ passes (incl. new regression test)
  • Validated in dev (mk8s/dev) as part of image 26.6.2-edge-jsonpatch.3; tenant kubelet-config re-uploads on patch change and the 1.35 node join succeeds.

Fixes: PSC-5381

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

KubeadmPhaseCreate caches the result of upload-config-kubelet behind
Configuration.Checksum(), which previously did not depend on
spec.kubernetes.kubelet.configurationJSONPatches. As a result, changes
to the patches after TCP initialization left the cached phase status
matching, the upload-config-kubelet phase short-circuited, and the
tenant's kubelet-config ConfigMap was never re-uploaded.

This commit threads the patch payload into Configuration.KubeletPatches
and folds it into Checksum(), so that any change to the JSON patches
invalidates the cached status and forces a re-upload on the next
reconcile.

Adds a unit test guarding the regression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant