-
Notifications
You must be signed in to change notification settings - Fork 613
CONSOLE-5163: Add labels field to Ingress componentRoutes #2845
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -245,6 +245,20 @@ type ComponentRouteSpec struct { | |
| // the Secret specification for a serving certificate will not be needed. | ||
| // +optional | ||
| ServingCertKeyPairSecret SecretNameReference `json:"servingCertKeyPairSecret"` | ||
|
|
||
| // labels defines additional labels to be applied to the route created | ||
| // for the component. These labels are used by the IngressController to | ||
| // determine which routes it should manage. | ||
| // Label keys and values must conform to Kubernetes label conventions: | ||
| // keys must be 1-63 characters (with optional prefix up to 253 characters), | ||
| // and values must be 0-63 characters, consisting of alphanumeric characters, | ||
| // '-', '_', or '.', and must start and end with an alphanumeric character. | ||
| // +optional | ||
| // +mapType=granular | ||
| // +kubebuilder:validation:MaxProperties=8 | ||
| // +kubebuilder:validation:XValidation:rule="self.all(key, key.matches('^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*[/])?([A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?)$'))",message="label keys must be valid Kubernetes label keys" | ||
| // +kubebuilder:validation:XValidation:rule="self.all(key, self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9])?$'))",message="label values must be valid Kubernetes label values (at most 63 characters, alphanumeric, '-', '_', or '.', must start and end with alphanumeric)" | ||
| Labels map[string]string `json:"labels,omitempty"` | ||
|
Comment on lines
+249
to
+261
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gate the new stable
As per coding guidelines, 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| // ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Document omitted behavior and map-size constraint in the field comment.
The
Labelscomment (Lines 249-256) does not state behavior when omitted and does not document theMaxProperties=8constraint declared on Line 258.As per coding guidelines,
**/types*.go: Documentation for+optionalfields must explain the behavior when the field is omitted, and all kubebuilder validation markers must be documented in the field's comment.🤖 Prompt for AI Agents