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 useful parameters to vserver and checks #292

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
26 changes: 25 additions & 1 deletion templates/keepalived-checks.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{% if tcp_check.retry is defined and tcp_check.retry | int %}
retry {{ tcp_check.retry }}
{% endif %}
{% if tcp_check.delay_loop is defined and tcp_check.delay_loop | int %}
delay_loop {{ tcp_check.delay_loop}}
{% endif %}
{% if tcp_check.delay_before_retry is defined and tcp_check.delay_before_retry | int %}
delay_before_retry {{ tcp_check.delay_before_retry }}
{% endif %}
Expand Down Expand Up @@ -96,6 +99,9 @@
connect_timeout {{ http_check.connect_timeout | default('3') }}
nb_get_retry {{ http_check.nb_get_retry | default('3') }}
delay_before_retry {{ http_check.delay_before_retry | default('2') }}
{% if http_check.delay_loop is defined and http_check.delay_loop | int %}
delay_loop {{ http_check.delay_loop}}
{% endif %}
{% if http_check.connect_port is defined and http_check.connect_port %}
connect_port {{ http_check.connect_port }}
{% endif %}
Expand Down Expand Up @@ -162,6 +168,9 @@
connect_timeout {{ ssl_check.connect_timeout | default('3') }}
nb_get_retry {{ ssl_check.nb_get_retry | default('3') }}
delay_before_retry {{ ssl_check.delay_before_retry | default('2') }}
{% if ssl_check.delay_loop is defined and ssl_check.delay_loop | int %}
delay_loop {{ ssl_check.delay_loop}}
{% endif %}
{% if ssl_check.connect_port is defined and ssl_check.connect_port %}
connect_port {{ ssl_check.connect_port }}
{% endif %}
Expand Down Expand Up @@ -228,6 +237,9 @@
{% if smtp_check.retry is defined and smtp_check.retry | int %}
retry {{ smtp_check.retry }}
{% endif %}
{% if smtp_check.delay_loop is defined and smtp_check.delay_loop | int %}
delay_loop {{ smtp_check.delay_loop}}
{% endif %}
{% if smtp_check.delay_before_retry is defined and smtp_check.delay_before_retry | int %}
delay_before_retry {{ smtp_check.delay_before_retry }}
{% endif %}
Expand Down Expand Up @@ -263,6 +275,9 @@
{% if bfd_check.retry is defined and bfd_check.retry | int %}
retry {{ bfd_check.retry }}
{% endif %}
{% if bfd_check.delay_loop is defined and bfd_check.delay_loop | int %}
delay_loop {{ bfd_check.delay_loop}}
{% endif %}
{% if bfd_check.delay_before_retry is defined and bfd_check.delay_before_retry | int %}
delay_before_retry {{ bfd_check.delay_before_retry }}
{% endif %}
Expand Down Expand Up @@ -290,14 +305,17 @@
{% if rserver.ping_checks is defined %}
{% for ping_check in rserver.ping_checks %}
PING_CHECK {
connect_port {{ ping_check.connect_port }}
connect_port {{ ping_check.connect_port | default(8080) }}
matchaxnb marked this conversation as resolved.
Show resolved Hide resolved
connect_timeout {{ ping_check.connect_timeout | default('5') }}
{% if ping_check.connect_ip is defined and ping_check.connect_ip %}
connect_ip {{ ping_check.connect_ip }}
{% endif %}
{% if ping_check.retry is defined and ping_check.retry | int %}
retry {{ ping_check.retry }}
{% endif %}
{% if ping_check.delay_loop is defined and ping_check.delay_loop | int %}
delay_loop {{ ping_check.delay_loop}}
{% endif %}
{% if ping_check.delay_before_retry is defined and ping_check.delay_before_retry | int %}
delay_before_retry {{ ping_check.delay_before_retry }}
{% endif %}
Expand Down Expand Up @@ -330,6 +348,9 @@
{% if udp_check.retry is defined and udp_check.retry | int %}
retry {{ udp_check.retry }}
{% endif %}
{% if udp_check.delay_loop is defined and udp_check.delay_loop | int %}
delay_loop {{ udp_check.delay_loop}}
{% endif %}
{% if udp_check.delay_before_retry is defined and udp_check.delay_before_retry | int %}
delay_before_retry {{ udp_check.delay_before_retry }}
{% endif %}
Expand Down Expand Up @@ -372,6 +393,9 @@
{% if file_check.delay_before_retry is defined and file_check.delay_before_retry | int %}
delay_before_retry {{ file_check.delay_before_retry }}
{% endif %}
{% if file_check.delay_loop is defined and file_check.delay_loop | int %}
delay_loop {{ file_check.delay_loop}}
{% endif %}
{% if file_check.warmup is defined and file_check.warmup %}
warmup {{ file_check.warmup }}
{% endif %}
Expand Down
3 changes: 3 additions & 0 deletions templates/keepalived-virtual-server.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
{% endif %}
lvs_sched {{ vserver.lvs_sched | default ('rr') }}
lvs_method {{ vserver.lvs_method | default ('DR') }}
{% if vserver.quorum is defined and vserver.quorum | int %}
quorum {{ vserver.quorum }}
{% endif %}
{% if vserver.persistence_timeout is defined %}
persistence_timeout {{ vserver.persistence_timeout }}
{% endif %}
Expand Down
Loading