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
Adjust nginx lb timeout depending on the cluster size in tests #82696
Conversation
/assign @wojtek-t |
@@ -873,6 +874,18 @@ func (cont *NginxIngressController) Init() { | |||
framework.Logf("ingress controller running in pod %v", cont.pod.Name) | |||
} | |||
|
|||
// TODO(mm4tt): Clean this up once we figure out a proper timeout. | |||
func getNginxLoadBalancerTimeout() time.Duration { |
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.
https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/service/const.go#L57
Can you please take a look into it?
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.
Done.
a5caa8e
to
b27d7ef
Compare
da64051
to
4f1b77e
Compare
svc.Spec.Type = v1.ServiceTypeLoadBalancer | ||
svc.Spec.Selector = map[string]string{"k8s-app": "nginx-ingress-lb"} | ||
svc.Spec.Ports = []v1.ServicePort{ | ||
{Name: "http", Port: 80}, | ||
{Name: "https", Port: 443}, | ||
{Name: "stats", Port: 18080}} | ||
}) | ||
svc := serviceJig.WaitForLoadBalancerOrFail(cont.Ns, "nginx-ingress-lb", e2eservice.LoadBalancerCreateTimeoutDefault) | ||
serviceJig.SanityCheckService(svc, v1.ServiceTypeLoadBalancer) | ||
cont.lbTimeout = e2eservice.LoadBalancerCreateTimeoutDefault |
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.
There is already a method for this: GetServiceLoadBalancerCreationTimeout
Please use it (and then you can remove lbTimeout from the struct - it won't be needed).
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.
Thanks, done.
4f1b77e
to
e047ef4
Compare
@wojtek-t, PTAL |
e047ef4
to
e035c68
Compare
test/e2e/network/ingress.go
Outdated
} | ||
ginkgo.By("Deleting ingress") | ||
jig.TryDeleteIngress() | ||
nginxController.TearDown() |
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 introducing this else above, can we add "defer nginxController.TearDown" before this if?
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.
Done.
In addition delete the service & lb before ending to test to avoid the case when deleting the namespace times out due to long LB deletion. Ref. kubernetes#82695
e035c68
to
532298c
Compare
/test pull-kubernetes-integration |
/test pull-kubernetes-kubemark-e2e-gce-big |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mm4tt, wojtek-t 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 |
/test pull-kubernetes-e2e-gce-100-performance |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
It adjusts the nginx ingress LoadBalancer timeout depending on the cluster size.
In addition we'll now delete the Service and LoadBalancer before ending to test to avoid the case when deleting the namespace times out due to long LB deletion.
This is to fix the #82695
Does this PR introduce a user-facing change?: