Skip to content

Shuffle endpoints using new env var for template router #4320

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

Merged
merged 1 commit into from
Oct 25, 2017

Conversation

rajatchopra
Copy link

As part of origin PR 14008, the server list of an haproxy template can now be shuffled on each reload. A new env var is introduced to select the processing choice (only one option 'shuffle' today).

@knobunc @pecameron PTAL

@rajatchopra
Copy link
Author

/cc @ahardin-rh

@@ -246,6 +246,8 @@ $ oc set env dc/router ROUTER_SYSLOG_ADDRESS=127.0.0.1 ROUTER_LOG_LEVEL=debug
|`*RELOAD_SCRIPT*` | | The path to the reload script to use to reload the router.
|`*ROUTER_ALLOWED_DOMAINS*` | | A comma-separated list of domains that the host name in a route can only be part of. Any subdomain in the domain can be used. Option `ROUTER_DENIED_DOMAINS` overrides any values given in this option. If set, everything outside of the allowed domains will be rejected.
|`*ROUTER_BACKEND_CHECK_INTERVAL*` | 5000ms | Length of time between subsequent "liveness" checks on backends. xref:time-units[(TimeUnits)]
|`*ROUTER_BACKEND_PROCESS_ENDPOINTS*` | | String to specify how the endpoints should be processed while using the template function
processEndpointsForAlias. Valid values are ["shuffle", ""]. "shuffle" will randomize the elements upon every call. Default behaviour returns in pre-determined order.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/behaviour/behavior

@ahardin-rh
Copy link
Contributor

@rajatchopra Is this targeting OCP 3.6? Thanks!

Also waiting on openshift/origin#14008 to merge

@ahardin-rh
Copy link
Contributor

@rajatchopra Is this still valid? Looks like we need a rebase. Thanks!

…n now be shuffled on each reload. A new env var is introduced to select the processing choice (only one option 'shuffle' today).
@rajatchopra
Copy link
Author

@ahardin-rh Still valid. Cleaned and rejigged. Thanks.

@ahardin-rh
Copy link
Contributor

@rajatchopra Thanks! What versions does this apply to? 3.6 and onward, or can it be applied to 3.4 and onward?

@rajatchopra
Copy link
Author

3.6 for sure. Will open another PR/issue if this needs to be made valid for 3.4 or earlier.

@ahardin-rh ahardin-rh added this to the Next Release milestone Oct 25, 2017
@ahardin-rh ahardin-rh self-assigned this Oct 25, 2017
@ahardin-rh ahardin-rh merged commit 6dd107b into openshift:master Oct 25, 2017
@ahardin-rh
Copy link
Contributor

[rev_history]
|xref:../architecture/networking/routes.adoc#architecture-core-concepts-routes[Networking -> Routes]
|Added ROUTER_BACKEND_PROCESS_ENDPOINTS to the xref:../architecture/networking/routes.adoc#env-variables[Router Environment Variables] table.
%

ahardin-rh pushed a commit to ahardin-rh/openshift-docs that referenced this pull request Oct 25, 2017
…proxy template can now be shuffled on each reload. A new env var is introduced to select the processing choice (only one option 'shuffle' today).

(cherry picked from commit 4c5480f) xref:openshift#4320
ahardin-rh pushed a commit to ahardin-rh/openshift-docs that referenced this pull request Oct 25, 2017
…proxy template can now be shuffled on each reload. A new env var is introduced to select the processing choice (only one option 'shuffle' today).

(cherry picked from commit 4c5480f) xref:openshift#4320
@mburke5678 mburke5678 modified the milestones: Next Release, Staging, Published - 11/03/17 Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants