-
Notifications
You must be signed in to change notification settings - Fork 515
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
operator/ingress: make .spec.endpointPublishingStrategy.type required #442
operator/ingress: make .spec.endpointPublishingStrategy.type required #442
Conversation
@@ -244,6 +244,7 @@ type EndpointPublishingStrategy struct { | |||
// networking, and is not explicitly published. The user must manually publish | |||
// the ingress controller. | |||
// +unionDiscriminator | |||
// +kubebuilder:validation:Required |
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.
Elsewhere I see +kubebuilder:validation:Required
paired with +required
(I would guess for consistency across various tools), so we should probably use both markers here.
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.
Fixed
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.
Yeah, +required
is for backwards compatibility/consistency. Both are supported
Followup to #440 |
The `.spec.endpointPublishingStrategy.type` is intended to be required (and that's how the field is persisted in 4.1). In the operator.openshift.io group, fields are optional by default[1]. Use an explicit marker to maintain compatibility. [1] https://github.com/openshift/api/blob/master/operator/v1/doc.go
3ea080e
to
ac32a08
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou, Miciah, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The
.spec.endpointPublishingStrategy.type
is intended to be required (andthat's how the field is persisted in 4.1). In the operator.openshift.io group,
fields are optional by default[1]. Use an explicit marker to maintain
compatibility.
[1] https://github.com/openshift/api/blob/master/operator/v1/doc.go