-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix a bug in Ingress update handler #3633
Conversation
/assign @ElvinEfendi You'll probably want to include that in 0.22.0 release. |
fc3842a
to
1eb9079
Compare
test/e2e/settings/ingress_class.go
Outdated
f.EnsureIngress(ing) | ||
|
||
f.WaitForNginxServer(invalidHost, func(cfg string) bool { | ||
return strings.Contains(cfg, "server_name foo") |
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.
If the ingress is not valid, this configuration will never be generated.
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.
this should be:
f.WaitForNginxConfiguration(func(cfg string) bool {
return !strings.Contains(cfg, "server_name foo")
})
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.
that's true 😕 but I managed to have it pass the e2e test locally. I'll check that out. Thanks!
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.
should be good now 👍
1eb9079
to
3fa8395
Compare
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, ElvinEfendi, wayt 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 |
What this PR does / why we need it:
As discussed #3586 (comment)
Changes to annotation
kubernetes.io/ingress.class
and.spec.rules
/.spec.backend
were not correctly handled.If the new value wasn't valid, the old Ingress was kept and updated instead of being deleted.
This was introduced in #3474 (@aledbf can you confirm?).
New tests have been added to prevent future regression.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer: