-
Notifications
You must be signed in to change notification settings - Fork 562
CORS-4136: Add Feature gates for AWS, Azure and GCP Dual Stack support #2430
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
CORS-4136: Add Feature gates for AWS, Azure and GCP Dual Stack support #2430
Conversation
Hello @sadasu! Some important instructions when contributing to openshift/api: |
@sadasu: This pull request references CORS-4136 which is a valid jira issue. 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.20.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. |
ed2ad9d
to
64aaf90
Compare
64aaf90
to
bf0c0db
Compare
config/v1/types_infrastructure.go
Outdated
// +default="IPFamiliesIPv4" | ||
// +kubebuilder:default:="IPFamiliesIPv4" |
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.
Are we sure we want to default this? Are there existing clusters where this could default to an incorrect value?
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.
All currently installed AWS,Azure and GCP clusters are ipv4 only so this seemed like the correct default. So, when we upgrade to a version with this API change, the address family would be unambiguous.
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.
Is there some way in the cluster that we could tell that the cluster is IPv4 and therefore set it based on something that already exists, rather than defaulting within the API based off of an assumption?
While all clusters today are ipv4, in theory in the future we could end up defaulting a cluster that is not ipv4 and this would then send the wrong message
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.
We are adding an install-config field for customers to set the IPFamily for the cluster for new installs. There too we are defaulting to IPV4. And as part of the support for dualstack, the Installer will always be explicitly setting this field in the Infra CR when the manifest is generated.
For existing clusters, we know that they are all IPv4 and hence added this defaulting behavior. Its value should be immutable.
config/v1/types_infrastructure.go
Outdated
@@ -536,6 +536,14 @@ type AWSPlatformStatus struct { | |||
// +optional | |||
// +nullable | |||
CloudLoadBalancerConfig *CloudLoadBalancerConfig `json:"cloudLoadBalancerConfig,omitempty"` | |||
|
|||
// ipFamily indicates the IP Address family supported by cluster nodes. |
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.
Explain the valid values and what they mean as part of the godoc
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.
Done.
@@ -1130,7 +1130,6 @@ spec: | |||
- HighlyAvailable | |||
- HighlyAvailableArbiter | |||
- SingleReplica | |||
- DualReplica |
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.
Not sure why this has been removed?
machineconfiguration/v1/types.go
Outdated
@@ -148,7 +148,7 @@ type ControllerConfigSpec struct { | |||
|
|||
// ipFamilies indicates the IP families in use by the cluster network | |||
// +required | |||
IPFamilies IPFamiliesType `json:"ipFamilies"` | |||
IPFamilies configv1.IPFamiliesType `json:"ipFamilies"` |
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 need to do this? We tend to prefer local types over importing from other packages
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.
IPFamiliesType was originally defined here : https://github.com/openshift/api/blob/master/machineconfiguration/v1/types.go#L177-L185.
Instead of redefining IPFamilies for use within types_infrastructure.go, i moved it to a common location in config/v1/types.go
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.
Are we confident that their use cases will not diverge? It's generally safer to have the two as separate APIs and not to share a common place like this
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.
I do not envision IP family types to diverge. But, let me try again by separating the APIs.
@@ -669,7 +669,7 @@ spec: | |||
when type is Name, and forbidden otherwise | |||
rule: 'has(self.type) && self.type == ''Name'' | |||
? has(self.name) : !has(self.name)' | |||
maxItems: 32 | |||
maxItems: 1 |
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.
This seems to be unrelated?
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.
This and the deletion of DualReplica
keeps showing up every time I run make update
.
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.
Make sure you rebase onto the latest main before you run the update command
6652e10
to
e7a5704
Compare
0bcd978
to
628d0cf
Compare
config/v1/types_infrastructure.go
Outdated
// infrastructure and all cluster resources are expected to have both IPv4 and IPv6 addresses. | ||
// +default="IPv4" | ||
// +kubebuilder:default:="IPv4" | ||
// +kubebuilder:validation:Enum="IPv4";"DualStack" |
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.
Generally prefer to have this on the type alias itself, rather than at the field level
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.
There was a question within the team regarding this field in the PlatformStatus. Could the same functionality be achieved using an existing API such as cloud provider config? My reasoning has been that we need a source of truth for the cluster that is easily available even on day-2 and within an API that we manage. Thoughts?
628d0cf
to
fb36988
Compare
config/v1/types_infrastructure.go
Outdated
// +kubebuilder:default:="IPv4" | ||
// +kubebuilder:validation:Enum="IPv4";"DualStack" | ||
// +openshift:enable:FeatureGate=AWSDualStackInstall | ||
// +kubebuilder:validation:XValidation:rule="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.
Do you have a test to show that if the value is DualStack
, and then someone tries to remove it, that it doesn't default to IPv4?
config/v1/types_infrastructure.go
Outdated
@@ -775,6 +801,19 @@ type GCPPlatformStatus struct { | |||
// +optional | |||
// +openshift:enable:FeatureGate=GCPCustomAPIEndpointsInstall | |||
ServiceEndpoints []GCPServiceEndpoint `json:"serviceEndpoints,omitempty"` | |||
|
|||
// ipFamily indicates the IP Address family supported by cluster nodes. |
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.
Explain in the godoc that the value is set at installation time and it cannot be changed
/cc |
fb36988
to
fd1a3b1
Compare
414fc84
to
91558af
Compare
91558af
to
5f5acf3
Compare
@JoelSpeed Refactored this PR to just add the feature gates because we still have some unanswered questions regarding the API changes. This is 4.21 feature work and seems weird that it requires the acknowledge-critical-fixes-only label. |
/tide refresh |
/lgtm |
@JoelSpeed: This PR has been marked as verified by 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed, sadasu 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 |
/label acknowledge-critical-fixes-only |
/retest-required |
@sadasu: This pull request references CORS-4136 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 either version "4.21." or "openshift-4.21.", but it targets "4.20.0" instead. 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. |
@sadasu: The following test 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. |
a30da32
into
openshift:master
No description provided.