-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
added an enviroment variable for balance alg. and ability to disable route cookies #11984
Conversation
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.
LGTM @openshift/networking PTAL
[test] |
We need to update the docs with the new ENV and with the annotation (and make sure all annotations are documented which may also resolve https://trello.com/c/hBWtixqA/299-add-tests-and-documentation-for-ddos-router-annotations-ingress and https://trello.com/c/62X44q90/276-document-the-router-template-format-and-how-to-use-annotations-ingress) |
The code changes look good. A couple of thoughts though.
|
Docs PR 3301 |
LGTM - tests flaked due yum/dnf cache sync. |
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.
LGTM
@JacobTanenbaum squash the commits and this is good to go - thx |
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 there be oadm router options to create the environment variable and annotation?
@@ -459,7 +465,11 @@ backend be_secure_{{$cfgIdx}} | |||
balance {{ $balanceAlgo }} | |||
{{ end }} | |||
{{ else }} | |||
{{ if (matchPattern "roundrobin|leastconn|source" (env "ROUTER_LOAD_BALANCE_ALGORITHM" "")) }} | |||
balance {{ env "ROUTER_LOAD_BALANCE_ALGORITHM" "leastconn"}} |
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 this environment variable be added to the DC as well? It would make it easier for the user and make the doc easier as well.
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.
We don't expose everything in the oadm. They can do 'oc set env dc/router ROUTER_LOAD_BALANCE_ALGORITHM=source' if they want to change it.
We need to make sure that we document the new environment variable and annotation. And we should provide a snippet showing how to set ENV and annotations from the cli (with a link to the full docs).
Last flake was rpm pull error. re-[test] |
route cookies added ROUTER_DEFAULT_BALANCE which allows the default balance algorithm for edge and reencrypt routes to be set for the cluster added annotation haproxy.router.openshift.io/use_cookies which when set to false | FALSE omits the creation of a cookie so the balance algorithm is used to determine endpoints everytime a request is made. changelog: - changed the name of the annotation haproxy.router.openshift.io/use_cookies to haproxy.router.openshift.io/disable_cookies - change env variable ROUTER_DEFAULT_LOAD_BALANCE to ROUTER_LOAD_BALANCE_ALGORITHM
fdfd901
to
377284f
Compare
Evaluated for origin test up to 377284f |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11871/) (Base Commit: a38151f) |
@knobunc is this good to merge? |
[merge] |
[merge] failure was flake #11024 (logs: https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12074/) |
Evaluated for origin merge up to 377284f |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11871/) (Base Commit: cb5c7e5) (Image: devenv-rhel7_5526) |
Starting since this merged, I've been seeing lots of TestRouter flakes. Can you help prove that this is not this PR? |
|
@JacobTanenbaum: Here's the link to the test queue: Unfortunately this PR is the only thing that touches code in roughly the right area before the failures start. |
@JacobTanenbaum you can ignore this (in case you haven't seen the discussion in #12236) |
added ROUTER_DEFAULT_BALANCE which allows the default balance algorithm
for edge and reencrypt routes to be set for the cluster
added annotation haproxy.router.openshift.io/use_cookies which when set
to false | FALSE omits the creation of a cookie so the balance algorithm
is used to determine endpoints everytime a request is made.
docs PR will follow once the new names are agreed on
Trello card https://trello.com/c/B56OdzdS