[release/1.5] Output a warning for label image labels instead of erroring#6187
Conversation
b4023b9 to
cfa52db
Compare
This change ignore errors during container runtime due to large image labels and instead outputs warning. This is necessary as certain image building tools like buildpacks may have large labels in the images which need not be passed to the container. Signed-off-by: Sambhav Kothari <[email protected]> (cherry picked from commit 2a8dac1) Signed-off-by: Kohei Tokunaga <[email protected]>
cfa52db to
b988fc9
Compare
|
Build succeeded.
|
| labels := make(map[string]string) | ||
| for k, v := range imageLabels { | ||
| labels[k] = v | ||
| if err := clabels.Validate(k, v); err == nil { |
There was a problem hiding this comment.
I don't remember why we limit the size of key/value. Is it possible to remove the limitation?
There was a problem hiding this comment.
We can discuss that in a separate issue / PR for the main branch, and then consider backporting.
kzys
left a comment
There was a problem hiding this comment.
LGTM since it is consistent with 1.6.x. Generally don't like warnings since people tend to ignore/miss them though.
|
/cc |
|
@aojea: GitHub didn't allow me to request PR reviews from the following users: aojea. Note that only containerd members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn 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. |
This patch seems to needed to fix kubernetes-sigs/kind#2518.
Backporting from #6124 (fixes #6123).
This change ignore errors during container runtime due to large
image labels and instead outputs warning. This is necessary as certain
image building tools like buildpacks may have large labels in the images
which need not be passed to the container.
Signed-off-by: Sambhav Kothari [email protected]
(cherry picked from commit 2a8dac1)
Signed-off-by: Kohei Tokunaga [email protected]