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 frontend maxconn and server-state options #77

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ haproxy_global_logs:
# - 2 1
haproxy_global_tunes:
- tune.ssl.default-dh-param: 2048
# haproxy_global_server_state_base: current

# Default
haproxy_default_logs:
Expand Down Expand Up @@ -83,6 +84,7 @@ haproxy_default_errorfiles:
# haproxy_default_http_check:
# haproxy_default_monitor_uri:
# haproxy_default_unique_id_format:
# haproxy_default_load_server_state_from_file: global

# Stats
haproxy_stats: true
Expand Down
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-default.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ defaults
{% if haproxy_default_unique_id_format is defined and haproxy_default_unique_id_format | length %}
unique-id-format {{ haproxy_default_unique_id_format }}
{% endif %}
{% if haproxy_default_load_server_state_from_file is defined and haproxy_default_load_server_state_from_file|length %}
load-server-state-from-file {{ haproxy_default_load_server_state_from_file }}
{% endif %}
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-frontend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ frontend {{ name }}
{% endif %}
{% if value.default_backend is defined %}
default_backend {{ value.default_backend }}
{% endif %}
{% if value.maxconn is defined %}
maxconn {{ value.maxconn }}
{% endif %}
{% if value.unique_id_format is defined %}
unique-id-format {{ value.unique_id_format }}
Expand Down
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-global.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ global
{% endfor %}
{% endfor %}
{% endif %}
{% if haproxy_global_server_state_base is defined %}
server-state-base {{ haproxy_global_server_state_base }}
{% endif %}
Loading