-
Notifications
You must be signed in to change notification settings - Fork 42.2k
Add image_id to CRI ContainerStatus message
#123583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add image_id to CRI ContainerStatus message
#123583
Conversation
5424142 to
19b7947
Compare
There is a conversion function `ConvertPodStatusToRunningPod`, which can override the `Container.ImageID` into a digested reference from the `ContainerStatus` CRI RPC, which gets mapped from the `image_ref`: https://github.com/kubernetes/kubernetes/blob/411c29c39f03687a30a8667295c61590def8fc89/pkg/kubelet/container/helpers.go#L259-L292 To avoid that failure case, we now introduce the same `image_id` into the container status and let runtimes separate the fields. We also add a note that the mapping from the digested reference of the CRI to the Kubernetes Pod API `ImageID` field is intentional and should not change. Follow-up on: kubernetes#123508 Signed-off-by: Sascha Grunert <[email protected]>
19b7947 to
e38531e
Compare
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 23b84deeaad2ffe9918b5d701b66ca6469283d79 |
|
/triage accepted |
mikebrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mikebrow, mrunalp, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
There is a conversion function
ConvertPodStatusToRunningPod, which can override theContainer.ImageIDinto a digested reference from theContainerStatusCRI RPC, which gets mapped from theimage_ref:kubernetes/pkg/kubelet/container/helpers.go
Lines 259 to 292 in 411c29c
To avoid that failure case, we now introduce the same
image_idinto the container status and let runtimes separate the fields.We also add a note that the mapping from the digested reference of the CRI to the Kubernetes Pod API
ImageIDfield is intentional and should not change.Which issue(s) this PR fixes:
Follow-up on: #123508
Special notes for your reviewer:
PTAL @mrunalp @haircommander @mikebrow @kubernetes/sig-node-pr-reviews
This is not a bug, it's preventing internal API misusage to create one.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: