-
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 buildupstream name to work with dynamic session affinity #2340
Conversation
/approve |
you need to update |
Codecov Report
@@ Coverage Diff @@
## master #2340 +/- ##
==========================================
+ Coverage 37.81% 37.86% +0.05%
==========================================
Files 72 72
Lines 5144 5145 +1
==========================================
+ Hits 1945 1948 +3
+ Misses 2902 2901 -1
+ Partials 297 296 -1
Continue to review full report at Codecov.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, zrdaley 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 |
@zrdaley thanks! |
What this PR does / why we need it:
When dynamic configuration is enabled,
ngx.var.proxy_upstream_name
is used to get the current backend (stored on the NGINX configuration) in the balancer lua module. This variable is created inbuildUpstreamName()
in /internal/ingress/controller/controller.go.PROBLEM: Backends stored in the NGINX configuration do not use the convention
sticky-<upstream-name>
when dynamic configuration is enabled. Ifngx.var.proxy_upstream_name
uses the sticky convention this will cause a 500 internal server error.This PR prevent buildUpstreamName from using the naming convention
sticky-<upstream-name>
when dynamic configuration is enabled prevent 500 internal server errors.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): N/ASpecial notes for your reviewer:
This is a prerequisite for dynamically configured sessions affinity [INSERT PR HERE]