-
Notifications
You must be signed in to change notification settings - Fork 192
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-3755: AWS: Add Ingress LB IPs to Infra CR when in-cluster DNS is enabled #1167
Conversation
@sadasu: This pull request references CORS-3755 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.18.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. |
@sadasu: This pull request references CORS-3755 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.18.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. |
/retest-required |
8b4f0f1
to
b0b548e
Compare
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.
Started review, but I have a concern that should be addressed before moving.
b0b548e
to
d7bc536
Compare
/test e2e-hypershift |
d7bc536
to
0ae34b2
Compare
/assign |
/retest-required |
/label acknowledge-critical-fixes-only |
265ef77
to
90693b7
Compare
@sadasu Do you mind putting a link to https://issues.redhat.com//browse/CORS-3755 in your second commit (the actual implementation)? Just a convenience for those trying to find the history. |
@sadasu: This pull request references CORS-3755 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.18.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. |
if len(ingress.IP) > 0 { | ||
if !slices.Contains(infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, configv1.IP(ingress.IP)) { | ||
t.Errorf("expected Infra CR to contain %s", ingress.IP) | ||
if !reflect.DeepEqual(infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, tc.expectedLBIPs) { | ||
t.Errorf("expected Infra CR to contain %s but found %s", tc.expectedLBIPs, infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs) | ||
} | ||
} | ||
if len(ingress.Hostname) > 0 { | ||
if !reflect.DeepEqual(infraConfig.Status.PlatformStatus.AWS.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, tc.expectedLBIPs) { | ||
t.Errorf("expected Infra CR to contain %s but found %s", tc.expectedLBIPs, infraConfig.Status.PlatformStatus.AWS.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs) | ||
} |
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.
Instead of using the status.loadBalancer.ingress.[ip|hostname]
to determine the platform, consider just using the platform provided in the test case. When we expand this to azure, this will have to be refactored because both GCP and Azure use ingress.IP
.
Also, this code is somewhat confusing. We loop through each of the status.loadBalancer.ingress
, but then in the reflect.DeepEqual
we don't use the ingress variable. I don't think we need to check if len(ingress.IP) > 0 {
, we can let the test compare if IngressLoadBalancerIPs
and tc.expectedLBIPs
are both nil
too for better coverage (making sure it doesn't add an unwanted IP).
if len(ingress.IP) > 0 { | |
if !slices.Contains(infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, configv1.IP(ingress.IP)) { | |
t.Errorf("expected Infra CR to contain %s", ingress.IP) | |
if !reflect.DeepEqual(infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, tc.expectedLBIPs) { | |
t.Errorf("expected Infra CR to contain %s but found %s", tc.expectedLBIPs, infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs) | |
} | |
} | |
if len(ingress.Hostname) > 0 { | |
if !reflect.DeepEqual(infraConfig.Status.PlatformStatus.AWS.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, tc.expectedLBIPs) { | |
t.Errorf("expected Infra CR to contain %s but found %s", tc.expectedLBIPs, infraConfig.Status.PlatformStatus.AWS.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs) | |
} | |
if updated { | |
switch tc.platform.Type { | |
case configv1.AWSPlatformType: | |
if !reflect.DeepEqual(infraConfig.Status.PlatformStatus.AWS.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, tc.expectedLBIPs) { | |
t.Errorf("expected Infra CR to contain %s but found %s", tc.expectedLBIPs, infraConfig.Status.PlatformStatus.AWS.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs) | |
} | |
case configv1.GCPPlatformType: | |
if !reflect.DeepEqual(infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs, tc.expectedLBIPs) { | |
t.Errorf("expected Infra CR to contain %s but found %s", tc.expectedLBIPs, infraConfig.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.ClusterHosted.IngressLoadBalancerIPs) | |
} | |
} | |
} |
Let me know if that makes sense.
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.
Yes to both. Updated.
0bf19a8
to
0663c8c
Compare
Thanks for the quick responses. I discussed with the team today, and we acknowledged the disadvantage of manually resolving the AWS load balancer hostname, but since this is restricted to tech preview, it's okay to move forward with this. Hopefully we can find a better design, but we will see how it works in tech preview. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gcs278 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 |
c292a36
to
8bca4db
Compare
Also set DNSManagementPolicy to Unmanaged when BYO DNS is enabled Implementation for https://issues.redhat.com//browse/CORS-3755
Add tests to verify value of EndpointPublishingStrategy on AWS platform when BYO DNS is enabled.
Add tests for the AWS Platform where the Ingress LB's Hostname is available but the Infra CR needs to be updated with its IP.
8bca4db
to
a8096c0
Compare
Not totally sure how we usually handle go vendor pruning updates, I noticed your first commit fails In this scenario, I think the vendoring update should actually be co-located with the commit that removed the import for /lgtm |
/retest-required |
Yes, the 1st commit is changing the imports requiring the vendoring updates. Sorry, I was following the installer team convention of separating out the vendoring changes into its own commit. |
/test e2e-aws-ovn-upgrade |
@sadasu: 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. |
/cherry-pick release-4.18 I think this landed shortly after automatic forwarding of release-4.18 to master stopped. So, initiating a backport to release-4.18. |
@sadasu: new pull request created: #1168 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 kubernetes-sigs/prow repository. |
[ART PR BUILD NOTIFIER] Distgit: ose-cluster-ingress-operator |
Add Ingress LB IPs to Infra CR and set DNS unmanaged when BYO DNS is enabled on the AWS platform.
Replicating the changes added for GCP as part of #1016 for the AWS platform.