-
Notifications
You must be signed in to change notification settings - Fork 460
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
Labels specified in the Gatway Infrastructure (i.e., .spec.infrastructure.labels
) might be invalid
#3197
Comments
@gauravkghildiyal thanks for looking into the issue. I fully understand your perspective. I had assumed that the infrastructure section was more tightly integrated with Kubernetes, as it is part of the in-cluster deployment GEP. |
Thanks @gauravkghildiyal and @snorwin! I think that's a reasonable explanation for why this might have happened, but especially as we're considering taking this API to GA, we likely want to make sure we have the validation as precise as we can. @keithmattix or @howardjohn would it be problematic to tighten this validation to match k8s labels? We could theoretically loosen this in the future if needed. |
From Istio POV we are fine with matching labels. I do see the valid point that it could be used for non-k8s, but I am not personally using it for that purpose at this time. |
I agree that this should match the validation for Kubernetes labels, since most if not all implementations will be using those. |
@youngnick is the discussion still ongoing or should I prepare a PR? |
I think a PR is a good next step, we'll make sure to mention it in the community meeting once it's opened, and leave it for folks to check out for a bit before merging. This is a breaking change, so it's important we get this in as part of the 1.2 release. |
This enhancement request is related to GEP: In Cluster Gateway Deployments (#1762)
What would you like to be added:
Along with
AnnotationValue
(which was introduced in #886), a new type alias calledLabelValue
should be introduced. Label values follow a well-defined format that can be validated using a pattern:Why this is needed:
If users can specify invalid label values in the
Gateway
resource, it may cause issues in the controllers if the values are not validated. The validation in the API schema eliminates the need for each controller to implement its own validation.The text was updated successfully, but these errors were encountered: