Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions test/extended/router/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,7 @@ var _ = g.Describe("[sig-network][Feature:Router]", func() {
infra, err := oc.AdminConfigClient().ConfigV1().Infrastructures().Get(context.Background(), "cluster", metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
platformType := infra.Status.Platform
dualStackIPFamily := false
if infra.Status.PlatformStatus != nil {
platformType = infra.Status.PlatformStatus.Type
if infra.Status.PlatformStatus.AWS != nil {
ipFamily := infra.Status.PlatformStatus.AWS.IPFamily
if ipFamily == configv1.DualStackIPv4Primary || ipFamily == configv1.DualStackIPv6Primary {
dualStackIPFamily = true
}
}
}
// Dual-stack installations on AWS are forced to use NLB type, which
// doesn't accept proxy protocol (yet).
proxyProtocol = (platformType == configv1.AWSPlatformType) && !dualStackIPFamily
proxyProtocol = platformType == configv1.AWSPlatformType

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this test ever run on upgraded clusters? If a cluster is installed at version 4.22 or earlier with its "default" IngressController configured to use an NLB, then the operator will configure the NLB and router not to use PROXY protocol, and the operator will not change the NLB or router to use PROXY protocol on upgrade.

It would be safer to check the service or router deployment to determine whether they are configured to use PROXY protocol. That would make the test more robust across OpenShift releases and across upgrade scenarios, such as the one that I described.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Miciah good catch. it's not a problem today because I see no variants of aws.*dualstack.*upgrade.* jobs. So, this will work, though fragile.

But I agree - our default ingress controller being upgraded from 4.22 will not have proxy protocol. If a upgrade variant of dualstack is ever added for 5.0, this test will break. Resolving the Router deployment proxy env variable is a better way to handle this.

But, I wouldn't say it's a blocker for this PR. Can be done in a follow up.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Another +1 from me. Checking the router setting is the better way about this 👍

it's not a problem today because I see no variants of aws.*dualstack.upgrade. jobs. So, this will work, though fragile.

Though, I wanted to say that AWS dual-stack networking is, as of now, a day-1-only feature (set at install time without options to switch day-2) and is TechPreview in 4.22; thus, there's no upgrade path to 5.0+ (or 4.23+). So, we should be safe. The upgrade will only be available in 5.0+/4.23+.


// This test needs to make assertions against a single router pod, so all access
// to the router should happen through a single endpoint.
Expand Down