fix(workloads): match image index platform digests#10688
Draft
weicao wants to merge 1 commit into
Draft
Conversation
Validate configured OCI and Docker image-index proofs against their exact raw bytes before atomically reloading registry configuration. Use the scheduled Node platform to match index-parent and manifest-child digests in either direction, while preserving direct digest and tag behavior. Propagate transient Node reads through InstanceSet and Instance status and update reconcilers.
Collaborator
|
Auto Cherry-pick Instructions CLA Recheck Instructions |
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.
What changed
getpermission and document the configuration shapeWhy
Kubernetes runtimes can report an OCI index digest in
status.containerStatuses[].imageIDwhile a PodSpec pins the selected platform manifest digest. Strict digest equality then keeps a valid, Ready Pod out of workload ready/available counts and blocks later rolling updates.The proof is explicit and offline. Missing or invalid proof, wrong parent/child/platform, unscheduled Pods, missing Nodes, and terminating Nodes all fail closed. Reconciliation does not contact a registry or read pull secrets. Pinning the parent index in every artifact pipeline was rejected because runtime reporting direction is not uniform and local sideload pipelines often have only a stable platform-manifest digest.
Proof hashing uses the exact base64-decoded raw index bytes, without JSON reserialization. Descriptors without a platform and
unknown/unknownattestations are ignored. Because a Kubernetes Node exposes only OS and architecture, descriptors with non-emptyvariant,os.version, oros.featuresare deliberately unusable. Multiple descriptors for one OS/architecture make only that platform unusable; other unique platforms remain available. A proof with no usable platform is rejected.This also corrects an existing hot-reload bug: the loader previously validated the active registry configuration instead of the candidate. An invalid registry mapping update could therefore replace the active snapshot. Invalid candidate updates are now rejected and the previous complete snapshot remains active.
Closes #10689.
Validation
0 passed / 1 failed)go test -p=1 ./pkg/controllerutil ./pkg/controller/instanceset ./pkg/controller/instance -count=1GOFLAGS=-p=1 make test-fastmake manifestsGOTOOLCHAIN=go1.25.10 make lint-fast(0 issues)