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 annotations to CRI ImageSpec objects #90061
Add annotations to CRI ImageSpec objects #90061
Conversation
/sig windows |
/uncc |
…e-handler info to CRI
d1ffcf4
to
99ecbd7
Compare
99ecbd7
to
9036772
Compare
/retest |
/cc @Random-Liu @yujuhong @tallclair @kkmsft @jterry75 |
// Unstructured key-value map holding arbitrary metadata. | ||
// ImageSpec Annotations can be used to help the runtime target specific | ||
// images in multi-arch images. | ||
map<string, string> annotations = 2; |
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.
Will this change make it into k8s.io/cri-api
? That's where we get the CRI spec for our code.
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.
yep, it would
/assign @Random-Liu @dchen1107 @derekwaynecarr PTAL |
@marosset: GitHub didn't allow me to assign the following users: PTAL. Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
||
spec := kubecontainer.ImageSpec{ | ||
Image: image, | ||
Annotations: podAnnotations, |
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.
Is there annotation that needs to be filtered before passing to ImageSpec ?
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.
It won't hurt anything to include all Pod annotations here and let the CRI/containerd pick which ones to use so I figured it would be cleaner here to just pass them all along.
I can update to include filtering if necessary - but that would require code updates in k/k to pass along other annotations in the future.
What does everyone think?
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.
I think it's hard to determine which annotations should be filtered. let's just pass all?
/cc |
/cc |
@fuweid: GitHub didn't allow me to request PR reviews from the following users: fuweid. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@feiskyer - could you take a look? |
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.
looks good
/lgtm
discussed in sig-node on 5/5, @dchen1107 to follow up with @Random-Liu |
@dchen1107 @Random-Liu were you able to review? |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marosset, Random-Liu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-files-remake |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds Annotations to the ImageSpec object in CRI api.
The expectation is that for Windows in order to use non-default runtime classes Pods would specify a
kubernetse.io/runtimehandler
annotation. This would get passed to the CRI and used during various image pull and sandbox creation operations.This behavior would be optional and would need to be implemented for each CRI independently.
Usage and more information can be found here: https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/windows-runtimeclass-support.md#adding-annotations-to-imagespec
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
KEP: