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

Remove flag sort-backends #3655

Merged
merged 1 commit into from
Jan 11, 2019
Merged

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Jan 11, 2019

What this PR does / why we need it:

The flag sort-backends was required to avoid reloads because of the change in the order of the upstream servers in the generated nginx.conf file. This is not an issue anymore since the use of lua.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 11, 2019
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 11, 2019
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2019
@ElvinEfendi
Copy link
Member

What is the actual cause of endpoints changing their order? If that cause still exists without sorting the upstreams we will now POST the payload to Lua endpoint unnecessarily, while this is better than reload it is still not good.

Again if the actual cause (I don't know what it is) still exists I'd just remove the flag and always sort.

@aledbf
Copy link
Member Author

aledbf commented Jan 11, 2019

What is the actual cause of endpoints changing their order?

The iteration in the go template

If that cause still exists without sorting the upstreams we will now POST the payload to Lua endpoint unnecessarily, while this is better than reload it is still not good.

That will not happen because to trigger a reload we check the equality of the configuration, thing that doesn't need the list to be ordered.

@aledbf
Copy link
Member Author

aledbf commented Jan 11, 2019

Also, the default value is false, so no change in the default behavior ;)

@ElvinEfendi
Copy link
Member

for _, c1b := range c1.Backends {
answers my question.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 11, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, ElvinEfendi

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

@@ -163,6 +160,8 @@ Feature backed by OpenResty Lua libraries. Requires that OCSP stapling is not en
`Disable support for catch-all Ingresses`)
)

flags.MarkDeprecated("sort-backends", "Feature removed because of the lua load balancer that removed the need of reloads for change in endpoints")
Copy link
Member

@ElvinEfendi ElvinEfendi Jan 11, 2019

Choose a reason for hiding this comment

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

you are already deleting it, why mark it as deprecated now?

deprecated tells me it is still there and working just deprecated i.e will be dropped in next release

@k8s-ci-robot k8s-ci-robot merged commit 287c4e5 into kubernetes:master Jan 11, 2019
@aledbf aledbf deleted the change-defaults branch January 11, 2019 21:36
sameersbn pushed a commit to bitnami-bot/kube-prod-runtime that referenced this pull request Feb 19, 2019
The `sort-backends` flag has been dropped from ingress-nginx in v0.22.0

* https://github.com/kubernetes/ingress-nginx/blob/master/Changelog.md
* kubernetes/ingress-nginx#3655

Signed-off-by: Sameer Naik <sameer@bitnami.com>
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants