-
Notifications
You must be signed in to change notification settings - Fork 591
OCPBUGS-32275: Add ingress.spec.domain immutability validation #2695
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 |
|---|---|---|
|
|
@@ -43,6 +43,7 @@ type IngressSpec struct { | |
| // default ingresscontroller domain will follow this pattern: "*.<domain>". | ||
| // | ||
| // Once set, changing domain is not currently supported. | ||
| // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="domain is immutable once set" | ||
| Domain string `json:"domain"` | ||
|
Comment on lines
+46
to
47
Contributor
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. Same as a comment from another thread, but copying here for posterity: Do we want to make |
||
|
|
||
| // appsDomain is an optional domain to use instead of the one specified | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -129,6 +129,9 @@ spec: | |
|
|
||
| Once set, changing domain is not currently supported. | ||
| type: string | ||
| x-kubernetes-validations: | ||
| - message: domain is immutable once set | ||
| rule: self == oldSelf | ||
grzpiotrowski marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+132
to
+134
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. So the rule is
Contributor
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. These validations should ratchet. If the domain field was specified as a non-empty string on an existing cluster, this would take effect and make it so that updates cannot change the field. Based on the bug this is linked to, that was never supported and causes degradation in the cluster, which means it should generally be OK to tighten this. Where this would be interesting is if |
||
| loadBalancer: | ||
| description: |- | ||
| loadBalancer contains the load balancer details in general which are not only specific to the underlying infrastructure | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.