From f309a0e7c2101c2567498b060ee71a6964d3b9e6 Mon Sep 17 00:00:00 2001 From: Milos Backonja <35807060+milosbackonja@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:25:04 +0200 Subject: [PATCH] fix: Chart refactor (#1143) Signed-off-by: Milos Backonja --- infrastructure/charts/agent/templates/_helpers.tpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/infrastructure/charts/agent/templates/_helpers.tpl b/infrastructure/charts/agent/templates/_helpers.tpl index 3ed226d1b3..be61b40c10 100644 --- a/infrastructure/charts/agent/templates/_helpers.tpl +++ b/infrastructure/charts/agent/templates/_helpers.tpl @@ -40,6 +40,7 @@ Create chart name and version as used by the chart label. {{- end }} {{- end }} {{- end -}} + {{- define "consumer-restriction" }} - name: consumer-restriction enable: {{ .Values.ingress.auth.consumer_restriction }} @@ -52,9 +53,12 @@ Create chart name and version as used by the chart label. - {{ regexReplaceAll "-" $.Release.Name "_" }}_{{ regexReplaceAll "-" . "_" | lower }} {{- end }} {{- end -}} + {{- define "labels.common" -}} -app.kubernetes.io/part-of: {{ include "cloud-agent.fullname" . }} -{{- end -}} +{{- $fullname := include "cloud-agent.fullname" $ -}} +app.kubernetes.io/part-of: {{ $fullname }} +{{- end }} + {{- define "headers.security" }} - name: response-rewrite enable: true @@ -69,6 +73,7 @@ app.kubernetes.io/part-of: {{ include "cloud-agent.fullname" . }} Cache-Control: "no-cache, no-store" remove: ["Server"] {{- end -}} + {{- define "headers.requestId" }} - name: request-id enable: true