Skip to content
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

NE-1530: IngressController LB Subnet Selection in AWS #1841

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented Apr 1, 2024

Allows users to specify subnets (i.e. Availability Zones) for IngressControllers using load balancers in AWS. Introduce
under the IngressControllerLBSubnetsAWS FeatureGate. Works for both CLB and NLBs.

Enhancement: openshift/enhancements#1595
Epic: https://issues.redhat.com/browse/NE-705

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 1, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 1, 2024

@gcs278: This pull request references NE-705 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 epic to target either version "4.16." or "openshift-4.16.", but it targets "openshift-4.13" instead.

In response to this:

Allows users to specify subnets (i.e. Availability Zones) for IngressControllers in AWS. Introduce under the
AWSLoadBalancerSubnetSelection FeatureGate. Works for both CLB and NLBs.

Enhancement: openshift/enhancements#1595
RFE: https://issues.redhat.com/browse/RFE-1717.

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 Apr 1, 2024

Hello @gcs278! 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 Apr 1, 2024
@openshift-ci openshift-ci bot requested review from deads2k and JoelSpeed April 1, 2024 00:11
@gcs278 gcs278 changed the title NE-705: Add API for AWS LB Subnet Selection NE-1530: Add API for AWS LB Subnet Selection Apr 1, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 1, 2024

@gcs278: This pull request references NE-1530 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.16.0" version, but no target version was set.

In response to this:

Allows users to specify subnets (i.e. Availability Zones) for IngressControllers in AWS. Introduce under the
AWSLoadBalancerSubnetSelection FeatureGate. Works for both CLB and NLBs.

Enhancement: openshift/enhancements#1595
RFE: https://issues.redhat.com/browse/RFE-1717.

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

openshift-ci-robot commented Apr 1, 2024

@gcs278: This pull request references NE-1530 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.16.0" version, but no target version was set.

In response to this:

Allows users to specify subnets (i.e. Availability Zones) for IngressControllers in AWS. Introduce under the
AWSLoadBalancerSubnetSelection FeatureGate. Works for both CLB and NLBs.

Enhancement: openshift/enhancements#1595
Epic: https://issues.redhat.com/browse/NE-705

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.

@gcs278 gcs278 changed the title NE-1530: Add API for AWS LB Subnet Selection [WIP] NE-1530: Add API for AWS LB Subnet Selection Apr 3, 2024
@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 Apr 3, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 3, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 3, 2024
@gcs278 gcs278 changed the title [WIP] NE-1530: Add API for AWS LB Subnet Selection NE-1530: IngressController LB Subnet Selection in AWS Apr 3, 2024
@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 Apr 3, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 3, 2024

@gcs278: This pull request references NE-1530 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.16.0" version, but no target version was set.

In response to this:

Allows users to specify subnets (i.e. Availability Zones) for IngressControllers using load balancers in AWS. Introduce
under the IngressControllerLBSubnetsAWS FeatureGate. Works for both CLB and NLBs.

Enhancement: openshift/enhancements#1595
Epic: https://issues.redhat.com/browse/NE-705

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.

@gcs278
Copy link
Contributor Author

gcs278 commented Apr 3, 2024

/hold
EP is still under review and it's likely we will add a ingresses.config.openshift.io.spec.loadBalancer.platform.aws.subnets field as well.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 3, 2024
@gcs278 gcs278 changed the title NE-1530: IngressController LB Subnet Selection in AWS [WIP] NE-1530: IngressController LB Subnet Selection in AWS Apr 6, 2024
@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 Apr 6, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 7, 2024
@gcs278 gcs278 changed the title [WIP] NE-1530: IngressController LB Subnet Selection in AWS NE-1530: IngressController LB Subnet Selection in AWS Apr 7, 2024
@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 Apr 7, 2024
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 13, 2024
@Miciah
Copy link
Contributor

Miciah commented Jun 27, 2024

I'm not sure whether this PR is waiting for my /lgtm or is only blocked on #1917, but just in case—
/lgtm

@JoelSpeed
Copy link
Contributor

/test verify-crd-schema

@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 1, 2024
@gcs278
Copy link
Contributor Author

gcs278 commented Jul 1, 2024

There is interest in refactoring Subnets from the higher-level AWSLoadBalancerParameters to more specific AWSClassicLoadBalancerParameters to AWSNetworkLoadBalancerParameters for better handling of future additions of new types of LBs.
/hold

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2024
@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 1, 2024
@gcs278
Copy link
Contributor Author

gcs278 commented Jul 1, 2024

@JoelSpeed @Miciah @candita updated API per @JoelSpeed suggestion in slack. The subnets field has been moved from AWSLoadBalancerParameters to under AWSClassicLoadBalancerParameters and AWSNetworkLoadBalancerParameters.

Sorry about mixing the rebase in the recent force push (I usually try to avoid that), but the changes are in the type_ingress.go diff and the Integration Tests diff

@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 3, 2024
@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 3, 2024
Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we fix the list comment I've made in both places that list shows up, then I'm happy with the API fields as they are.

Are we only doing subnets in the spec now? I thought they were previously in spec and status?

// AWSSubnets contains a list of references to AWS subnets by
// ID or name.
// +kubebuilder:validation:XValidation:rule=`has(self.ids) && has(self.names) ? size(self.ids + self.names) <= 10 : true`,message="the total number of subnets cannot exceed 10"
// +kubebuilder:validation:XValidation:rule=`has(self.ids) || has(self.names)`,message="must specify at least 1 subnet name or id"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a min properties validation that means you must have at least one item in the struct for it to be valid, not sure if that's better than this (since you have a custom error message), but thought I'd let you know in case you wanted to try it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I appreciate the pointer. The error message with // +kubebuilder:validation:MinProperties=1 is:

spec.endpointPublishingStrategy.loadBalancer.providerParameters.aws.classicLoadBalancer.subnets in body should have at least 1 properties

I suppose my custom error message may be considered slightly more specific than that, so I'll keep the CEL.

operator/v1/types_ingress.go Outdated Show resolved Hide resolved
Copy link
Contributor Author

@gcs278 gcs278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JoelSpeed

Allows users to specify subnets (i.e. Availability Zones) for
IngressControllers using load balancers in AWS. Introduce
under the `IngressControllerLBSubnetsAWS` FeatureGate.
@JoelSpeed
Copy link
Contributor

/lgtm

Feel free to cancel the hold if the network folks are happy now

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2024
@JoelSpeed
Copy link
Contributor

/override ci/prow/verify-crd-schema

Copy link
Contributor

openshift-ci bot commented Jul 9, 2024

@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/verify-crd-schema

In response to this:

/override ci/prow/verify-crd-schema

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.

@candita
Copy link
Contributor

candita commented Jul 9, 2024

/lgtm
/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 9, 2024
Copy link
Contributor

openshift-ci bot commented Jul 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita, gcs278, JoelSpeed, Miciah

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

Copy link
Contributor

openshift-ci bot commented Jul 10, 2024

@gcs278: all tests passed!

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 465787e into openshift:master Jul 10, 2024
18 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-config-api-container-v4.17.0-202407100341.p0.g465787e.assembly.stream.el9 for distgit ose-cluster-config-api.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants