From a79f513ac4f87bdf5954025b04f987c7324154f9 Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Thu, 17 Oct 2024 15:27:45 +0200 Subject: [PATCH 1/2] ncm-metaconfig: haproxy - add cookie config option --- ncm-metaconfig/src/main/metaconfig/haproxy/pan/schema.pan | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ncm-metaconfig/src/main/metaconfig/haproxy/pan/schema.pan b/ncm-metaconfig/src/main/metaconfig/haproxy/pan/schema.pan index 4334a42711..b49f4a1bd6 100644 --- a/ncm-metaconfig/src/main/metaconfig/haproxy/pan/schema.pan +++ b/ncm-metaconfig/src/main/metaconfig/haproxy/pan/schema.pan @@ -198,6 +198,7 @@ type haproxy_service_server_params = { 'check' ? boolean @{different health check port} 'port' ? type_port + 'cookie' ? string }; type haproxy_service_bind_params = { @@ -252,6 +253,7 @@ type haproxy_service_backend = { 'reqrep' ? haproxy_service_reqrep[] 'http-request' ? string[] 'acl' ? dict() + 'cookie' ? string }; @documentation { From 95a507c6acbf3ad4f1b4440f7b1a63c180a983ce Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Mon, 28 Oct 2024 12:24:01 +0100 Subject: [PATCH 2/2] ncm-metaconfig: haproxy - add cookie option to tt file The params.tt file doens't need to be changed. All specified params are added to the server entry. --- ncm-metaconfig/src/main/metaconfig/haproxy/backend.tt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ncm-metaconfig/src/main/metaconfig/haproxy/backend.tt b/ncm-metaconfig/src/main/metaconfig/haproxy/backend.tt index d1cbf095f8..eff0414dd0 100644 --- a/ncm-metaconfig/src/main/metaconfig/haproxy/backend.tt +++ b/ncm-metaconfig/src/main/metaconfig/haproxy/backend.tt @@ -4,6 +4,9 @@ balance [% bke.balance %] [% IF bke.mode -%] mode [% bke.mode %] [% END -%] +[% IF bke.cookie -%] +cookie [% bke.cookie %] +[% END -%] [% FOREACH option IN bke.options -%] option [% option %] [% END -%]