Skip to content

Conversation

sadasu
Copy link
Contributor

@sadasu sadasu commented Jul 31, 2025

No description provided.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 31, 2025
Copy link
Contributor

openshift-ci bot commented Jul 31, 2025

Hello @sadasu! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 31, 2025
@sadasu sadasu changed the title Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support CORS-4136, CORS-4157: Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support Jul 31, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 31, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 31, 2025

@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.

@openshift-ci openshift-ci bot requested review from JoelSpeed and sinnykumari July 31, 2025 15:33
@sadasu sadasu changed the title CORS-4136, CORS-4157: Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support [WIP] CORS-4136, CORS-4157: Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support Jul 31, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 31, 2025
@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch from ed2ad9d to 64aaf90 Compare July 31, 2025 15:57
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 31, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2025
@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch from 64aaf90 to bf0c0db Compare August 6, 2025 21:24
@sadasu sadasu changed the title [WIP] CORS-4136, CORS-4157: Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support CORS-4136, CORS-4157: Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support Aug 6, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2025
Comment on lines 541 to 542
// +default="IPFamiliesIPv4"
// +kubebuilder:default:="IPFamiliesIPv4"
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

@@ -536,6 +536,14 @@ type AWSPlatformStatus struct {
// +optional
// +nullable
CloudLoadBalancerConfig *CloudLoadBalancerConfig `json:"cloudLoadBalancerConfig,omitempty"`

// ipFamily indicates the IP Address family supported by cluster nodes.
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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?

@@ -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"`
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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

@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch 2 times, most recently from 6652e10 to e7a5704 Compare August 8, 2025 19:17
@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch 3 times, most recently from 0bcd978 to 628d0cf Compare August 12, 2025 16:15
// infrastructure and all cluster resources are expected to have both IPv4 and IPv6 addresses.
// +default="IPv4"
// +kubebuilder:default:="IPv4"
// +kubebuilder:validation:Enum="IPv4";"DualStack"
Copy link
Contributor

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

Copy link
Contributor Author

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?

@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch from 628d0cf to fb36988 Compare August 14, 2025 02:57
// +kubebuilder:default:="IPv4"
// +kubebuilder:validation:Enum="IPv4";"DualStack"
// +openshift:enable:FeatureGate=AWSDualStackInstall
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ipFamily is immutable once set"
Copy link
Contributor

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?

@@ -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.
Copy link
Contributor

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

@jhixson74
Copy link
Member

/cc

@openshift-ci openshift-ci bot requested a review from jhixson74 August 26, 2025 21:37
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2025
@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch from fb36988 to fd1a3b1 Compare September 3, 2025 17:51
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 3, 2025
@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch 2 times, most recently from 414fc84 to 91558af Compare September 3, 2025 18:53
@sadasu sadasu changed the title CORS-4136, CORS-4157: Add Feature gates and update Infrastructure API for AWS, Azure and GCP Dual Stack support CORS-4136, CORS-4157: Add Feature gates for AWS, Azure and GCP Dual Stack support Sep 3, 2025
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 3, 2025
@sadasu sadasu force-pushed the aws-azure-gcp-dual-stack branch from 91558af to 5f5acf3 Compare September 3, 2025 20:01
@sadasu
Copy link
Contributor Author

sadasu commented Sep 3, 2025

@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.

@sadasu
Copy link
Contributor Author

sadasu commented Sep 3, 2025

/tide refresh

@JoelSpeed
Copy link
Contributor

/lgtm
/verified by existing E2Es passing

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 4, 2025
@openshift-ci-robot
Copy link

@JoelSpeed: This PR has been marked as verified by existing E2Es passing.

In response to this:

/lgtm
/verified by existing E2Es passing

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2025
Copy link
Contributor

openshift-ci bot commented Sep 4, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2025
@sadasu
Copy link
Contributor Author

sadasu commented Sep 4, 2025

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Sep 4, 2025
@sadasu
Copy link
Contributor Author

sadasu commented Sep 4, 2025

/retest-required

@sadasu sadasu changed the title CORS-4136, CORS-4157: Add Feature gates for AWS, Azure and GCP Dual Stack support CORS-4136: Add Feature gates for AWS, Azure and GCP Dual Stack support Sep 4, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 4, 2025

@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.

Copy link
Contributor

openshift-ci bot commented Sep 4, 2025

@sadasu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp 5f5acf3 link false /test e2e-gcp

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.

@openshift-merge-bot openshift-merge-bot bot merged commit a30da32 into openshift:master Sep 4, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants