Closed nak3 closed 3 years ago
@stevesloka @skriss @sunjayBhatia should we simply trim the tag at 63 characters?
@stevesloka @skriss @sunjayBhatia should we simply trim the tag at 63 characters?
I think TagFromImage
assumes you are using <imagename>:<tag>
rather than the image digest format: <imagename>@sha256:<digest>
it makes sense to me to be able to specify a specific image digest as a valid thing a user would do
it isn't valid to use a shortened reference for an image digest or even tag when trying to create a container, and the lost info from trimming it would make it so you cant use that string to reference an actual image
might need to reconsider the pattern for the labels, does it need to be the actual version of the image in use or can it be something else
it isn't valid to use a shortened reference for an image digest or even tag when trying to create a container, and the lost info from trimming it would make it so you cant use that string to reference an actual image
@sunjayBhatia the issue is using the image as the value for the "app.kubernetes.io/version" label key per k8s recommendations.. The spec requires label values to be less than 63 characters.
it isn't valid to use a shortened reference for an image digest or even tag when trying to create a container, and the lost info from trimming it would make it so you cant use that string to reference an actual image
@sunjayBhatia the issue is using the image as the value for the "app.kubernetes.io/version" label key per k8s recommendations.. The spec requires label values to be less than 63 characters.
right, the thing is just trimming a long image tag or image digest makes it so that string is no longer usable as a reference to an actual image, so you could maybe guess what the version of Contour is based on that label value but you could still technically be wrong
since this is potential API surface that people/tools can rely on, we should define what the goal of the label is, is it to be able to reference a Contour image explicitly? or can it be something made up that people shouldn't expect to reference an image with?
In the maintainer meeting today, we agreed that we will remove the use of this label for now, so that it doesn't block creation of anything.
@youngnick I updated https://github.com/projectcontour/contour-operator/pull/369 to remove the "app.kubernetes.io/version" label, PTAL.
What steps did you take and what happened:
0. Deploy contour-operator
1. Add
--contour-image
option with long tag imagee.g. image has
19b539fd22cdf70c67df81430e99c9c0c0a301948143f7cfc45471b367bccbf9
tag.2. Contour and Envoy are not deployed.
contour-operator pod prints the following log.
What did you expect to happen:
Anything else you would like to add:
https://github.com/projectcontour/contour-operator/blob/f7f7e61fda0085853eb9f17571138a9243629e5d/internal/objects/daemonset/daemonset.go#L119 https://github.com/projectcontour/contour-operator/blob/f7f7e61fda0085853eb9f17571138a9243629e5d/internal/objects/deployment/deployment.go#L228