diff --git a/charts/gateway/templates/_helpers.tpl b/charts/gateway/templates/_helpers.tpl index ad52b0d..23b6267 100644 --- a/charts/gateway/templates/_helpers.tpl +++ b/charts/gateway/templates/_helpers.tpl @@ -146,7 +146,7 @@ Get the first admin user from the list of users {{/* Check if env exist in context - +Usage : include "conduktor-gateway.envExists" (dict "envkey" "ENV_VAR_NAME" "context" $) Params: - envKey - String - Required - Name of the env. - context - Context - Required - Parent context. diff --git a/charts/gateway/templates/deployment.yaml b/charts/gateway/templates/deployment.yaml index 443192f..19f2da7 100644 --- a/charts/gateway/templates/deployment.yaml +++ b/charts/gateway/templates/deployment.yaml @@ -54,8 +54,10 @@ spec: - name: JAVA_TOOL_OPTIONS value: {{ tpl .Values.gateway.jmx.jvmArgs . | quote }} {{- end}} + {{- if eq (include "conduktor-gateway.envExists" (dict "envkey" "GATEWAY_SECURED_METRICS" "context" $)) "false" }} - name: GATEWAY_SECURED_METRICS value: {{ .Values.gateway.admin.securedMetrics | quote }} + {{- end}} {{- if and .Values.gateway.userPool .Values.gateway.userPool.serviceAccountRequired }} - name: GATEWAY_USER_POOL_SERVICE_ACCOUNT_REQUIRED value: {{ .Values.gateway.userPool.serviceAccountRequired | quote }}