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

add some options to let us Do Openshift load balancers #2

Merged
merged 1 commit into from
May 8, 2020

Conversation

bstinsonmhk
Copy link
Contributor

@davidkirwan @siddharthvipul Here's a PR for review/comment

@bstinsonmhk bstinsonmhk requested a review from arrfab May 6, 2020 15:08
Copy link
Member

@arrfab arrfab left a comment

Choose a reason for hiding this comment

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

Can you review my comments please ?
@davidkirwan and myself did the review online in "peer" mode

balance source
mode tcp
{% for server in haproxy_ocp_app_nodes %}
server {{ server }}:6443 check
Copy link
Member

Choose a reason for hiding this comment

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

Just looking at the frontend, it seems listening on tcp/443, but I see in backend that you check on port tcp/6443.
Based on some research with @davidkirwan we found this :
https://github.com/openshift-tigerteam/guides/blob/master/ocp4/ocp4-haproxy.cfg#L119
So I guess ingress http and https are just using tcp/80 and tcp/443, even on backend (so with a list of all workers ?)

backend openshift-app-http-be
balance source
mode tcp
{% for server in haproxy_ocp_app_nodes %}
Copy link
Member

Choose a reason for hiding this comment

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

for variables/lists like "haproxy_ocp_app_nodes", there is no default in defaults/main.yml but can be easily added.
What about the idea of using a list of ansible group[s] coming from inventory and automatically add entries in haproxy when a node is added in such group ?
See for example how unbound role does it :
https://github.com/CentOS/ansible-role-unbound/blob/master/defaults/main.yml#L34
https://github.com/CentOS/ansible-role-unbound/blob/master/templates/02_localzone_cache.conf.j2#L5

That would permit to be "dynamic" on each haproxy role execution (after inventory was just changed) ? Or is that what you had in mind ?

@bstinsonmhk bstinsonmhk merged commit 5047499 into CentOS:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants