fix(kubeadm): include kubelet JSON patches in phase checksum#2
Open
gfariasalves-ionos wants to merge 1 commit into
Open
fix(kubeadm): include kubelet JSON patches in phase checksum#2gfariasalves-ionos wants to merge 1 commit into
gfariasalves-ionos wants to merge 1 commit into
Conversation
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.
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.
Problem
KubeadmPhaseCreatecaches the result ofupload-config-kubeletbehindConfiguration.Checksum(), which did not depend onspec.kubernetes.kubelet.configurationJSONPatches. So changes to the patches after TCP initialization left the cached phase status matching → theupload-config-kubeletphase short-circuited → the tenant'skubelet-configConfigMap 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.KubeletPatchesand fold it intoChecksum(), 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)mk8s/dev) as part of image26.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