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

Add ingress-controller test #107

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

rlobillo
Copy link
Contributor

@rlobillo rlobillo commented Jun 9, 2023

https://issues.redhat.com/browse/OSASINFRA-2412

Tech debt in openstack-test: This test creates an ingress-controller matching the canary route label. It checks that the openstack loadbalancer is created with the expected attributes and access 100 times the service from outside to confirm that the functionality is provided using the expected new path (The openstack loadbalancer).

@rlobillo
Copy link
Contributor Author

rlobillo commented Jun 9, 2023

/test test

@rlobillo
Copy link
Contributor Author

/cc @dulek

@rlobillo
Copy link
Contributor Author

/retest

@MaysaMacedo
Copy link
Contributor

/cc @MaysaMacedo

@openshift-ci openshift-ci bot requested a review from MaysaMacedo June 19, 2023 14:03
@rlobillo
Copy link
Contributor Author

/test test-kuryr

@@ -553,6 +613,7 @@ var _ = g.Describe("[sig-installer][Suite:openshift/openstack][lb][Serial] The O
o.Expect(successConnCount >= minSuccessConn).To(o.BeTrue(), "Found less successful connections (%d) than the minimum expected of '%d'", successConnCount, minSuccessConn)
e2e.Logf("Found expected number of successfull connections: '%d'", connNumber)
})

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Unneeded change?

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

Comment on lines +438 to +456
o.Expect(err).NotTo(o.HaveOccurred(), "router-%q not found in openshift-ingress namespace", name)
o.Expect(svc.Spec.Type).Should(o.Equal(v1.ServiceTypeLoadBalancer), "Unexpected svc Type: %q", svc.Spec.Type)
loadBalancerId := svc.GetAnnotations()["loadbalancer.openstack.org/load-balancer-id"]
o.Expect(loadBalancerId).ShouldNot(o.BeEmpty(), "load-balancer-id annotation missing")
o.Expect(svc.Status.LoadBalancer.Ingress).ShouldNot(o.BeEmpty(), "svc.Status.LoadBalancer.Ingress should not be empty")
svcIp := svc.Status.LoadBalancer.Ingress[0].IP
o.Expect(svcIp).ShouldNot(o.BeEmpty(), "FIP missing on svc Status")
o.Expect(svc.Spec.ExternalTrafficPolicy).Should(o.Equal(v1.ServiceExternalTrafficPolicyTypeLocal),
"Unexpected ExternalTrafficPolicy on svc specs")
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like we're testing what should be covered already in origin here, but I don't see it as an important issue.

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 test includes also openstack checks. Origin is only openshift.

g.By("Test that the canary service is accessible through new ingressController")
route, err := oc.AdminRouteClient().RouteV1().Routes("openshift-ingress-canary").Get(context.Background(), "canary", metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred(), "canary route not found")
for i := 0; i < 100; i++ {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if checking 100 times won't increase flakiness of the tests. It's just a question here, maybe it's just fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I check in D/S setups and the U/S gate, it is stable. My intention here is to confirm that the traffic is correctly routed to the canary app so there is no loss of queries (as we were observing with this ETP:Local thing).

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, that indeed makes sense.

@dulek
Copy link
Contributor

dulek commented Jun 26, 2023

Looks good, please fix the conflict, answer my questions inline and let's proceed with this.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2023
route, err := oc.AdminRouteClient().RouteV1().Routes("openshift-ingress-canary").Get(context.Background(), "canary", metav1.GetOptions{})
o.Expect(err).NotTo(o.HaveOccurred(), "canary route not found")
for i := 0; i < 100; i++ {
resp, err := httpsGetWithCustomLookup(route.Spec.Host, svcIp)
Copy link
Contributor

Choose a reason for hiding this comment

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

is only testing request for port 443 enough?
I don't have a strong opinion here, I just started thinking about this when read your comment on line 453.

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 found issues testing the connectivty to port 80 because the app is redirecting to 443 and then I hit cert issues.

We are covering multiple pools in the test "[sig-installer][Suite:openshift/openstack][lb][Serial] The Openstack platform should re-use an existing UDP Amphora LoadBalancer when new svc is created on Openshift with the proper annotation"

Copy link
Contributor

@MaysaMacedo MaysaMacedo left a comment

Choose a reason for hiding this comment

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

I just have one question, but in general it LGTM.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2023
https://issues.redhat.com/browse/OSASINFRA-2412

Tech debt in openstack-test: This test creates an ingress-controller
matching the canary route label. It checks that the openstack loadbalancer
is created with the expected attributes and access 100 times the service
from outside to confirm that the functionality is provided using the
expected new path.
@MaysaMacedo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2023
@dulek
Copy link
Contributor

dulek commented Jun 28, 2023

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek

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 Jun 28, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2023

@rlobillo: 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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 6f79888 into openshift:main Jun 28, 2023
6 checks passed
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants