add stickiness options

This commit is contained in:
Arne Teuke
2025-02-12 14:34:11 +01:00
parent 57566d61d5
commit b77a536b60
2 changed files with 8 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ define cd_haproxy::server::proxy (
$fe_tcp_request = '',
$fe_http_request = '',
$backend_configs = [],
$be_stick_table = '',
$be_stick_on = '',
) {

View File

@@ -10,6 +10,12 @@ balance <%= backend_config['be_balance'] %>
<% if backend_config['be_option'] and backend_config['be_option'] != '' -%>
option <%= backend_config['be_option'] %>
<% end -%>
<% if backend_config['be_stick_table'] and backend_config['be_stick_table'] != '' -%>
stick-table <%= backend_config['be_stick_table'] %>
<% end -%>
<% if backend_config['be_stick_on'] and backend_config['be_stick_on'] != '' -%>
stick on <%= backend_config['be_stick_on'] %>
<% end -%>
<% if backend_config['be_server_name_array'] and !backend_config['be_server_name_array'].empty? -%>
<% backend_config['be_server_name_array'].each do |be_server_name| -%>
server <%= be_server_name %>