From 7ceedc5e775a6b3f9d826f0282cb7ae8c6eca2a3 Mon Sep 17 00:00:00 2001 From: shahargl Date: Fri, 15 Nov 2024 13:30:07 +0200 Subject: [PATCH] feat: haproxy --- charts/keep/templates/ingress-haproxy.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/keep/templates/ingress-haproxy.yaml b/charts/keep/templates/ingress-haproxy.yaml index 285e5d9..366946e 100644 --- a/charts/keep/templates/ingress-haproxy.yaml +++ b/charts/keep/templates/ingress-haproxy.yaml @@ -24,10 +24,10 @@ metadata: # Backend configurations for path rewrites haproxy-ingress.github.io/config-backend: | - acl path_v2 path_beg /v2/ - acl path_ws path_beg /websocket/ - http-request set-path %[path,regsub(^/v2/,/)] if path_v2 - http-request set-path %[path,regsub(^/websocket/,/)] if path_ws + acl path_v2 path_beg {{ .Values.global.ingress.backendPrefix }}/ + acl path_ws path_beg {{ .Values.global.ingress.websocketPrefix }}/ + http-request set-path %[path,regsub(^{{ .Values.global.ingress.backendPrefix }}/,/)] if path_v2 + http-request set-path %[path,regsub(^{{ .Values.global.ingress.websocketPrefix }}/,/)] if path_ws spec: ingressClassName: haproxy @@ -48,7 +48,7 @@ spec: http: paths: {{- if $.Values.websocket.enabled }} - - path: "/websocket" + - path: {{ $.Values.global.ingress.websocketPrefix }} pathType: Prefix backend: service: @@ -57,7 +57,7 @@ spec: number: {{ $.Values.websocket.service.port }} {{- end }} {{- if $.Values.backend.enabled }} - - path: "/v2" + - path: {{ $.Values.global.ingress.backendPrefix }} pathType: Prefix backend: service: @@ -77,7 +77,7 @@ spec: - http: paths: {{- if $.Values.websocket.enabled }} - - path: "/websocket" + - path: {{ $.Values.global.ingress.websocketPrefix }} pathType: Prefix backend: service: @@ -86,7 +86,7 @@ spec: number: {{ $.Values.websocket.service.port }} {{- end }} {{- if $.Values.backend.enabled }} - - path: "/v2" + - path: {{ $.Values.global.ingress.backendPrefix }} pathType: Prefix backend: service: