-
Notifications
You must be signed in to change notification settings - Fork 568
CORS-4157: AWS, Azure: Add IPFamily to the PlatformStatus within Infra CR #2499
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?
Conversation
@sadasu: This pull request references CORS-4157 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Hello @sadasu! Some important instructions when contributing to openshift/api: |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
bffb15b
to
29d9d89
Compare
config/v1/types_infrastructure.go
Outdated
|
||
// IPFamilyType represents the IP protocol family that cloud platform resources should use. | ||
// +kubebuilder:validation:Enum=IPv4;DualIPv6Primary;DualIPv4Primary | ||
// +kubebuilder:validation:XValidation:rule="self in ['IPv4', 'DualIPv6Primary', 'DualIPv4Primary']",message="ipFamily must be one of: IPv4, DualIPv6Primary, DualIPv4Primary" |
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.
The enum
should cover this, so I don't think we need this CEL too
config/v1/types_infrastructure.go
Outdated
// IPv4 indicates that cloud platform resources should use IPv4 addressing only. | ||
IPv4 IPFamilyType = "IPv4" | ||
|
||
// DualIPv6Primary indicates that cloud platform resources should use dual-stack networking with IPv6 as primary. |
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.
Do we want to call this DualStackIPv6Primary? I figure we often call it DualStack in other places so omitting Stack here might be confusing?
config/v1/types_infrastructure.go
Outdated
// | ||
// +default="IPv4" | ||
// +kubebuilder:default="IPv4" | ||
// +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="ipFamily is immutable once set" |
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.
Can you try this instead? I think this will be more robust
// +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="ipFamily is immutable once set" | |
// +kubebuilder:validation:XValidation:rule="!oldSelf.hasValue() || self == oldSelf",message="ipFamily is immutable once set",optionalOldSelf=true |
|
||
// AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. | ||
// This only includes fields that can be modified in the cluster. | ||
type AWSPlatformSpec struct { |
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.
Need a CEL rule here to prevent removing ipFamily if it exists
!has(oldSelf.ipFamily) || has(self.ipFamily)
- The new IPFamily can be set to IPv4, DualStackIPv6Primary or DualStackIPv4Primary. - This capability is currently behind feature gates that were added earlier. - ControllerConfig is also updated because it embeds the Infra object. - Added tests for this new field.
29d9d89
to
2c87771
Compare
@sadasu: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
IPFamily
to AWS and Azure PlatformStatus to indicate the IPFamily configured by the user for that cluster install.