From 010f15f7ccd2d6f11d79fa73f53e3cc729dcaa37 Mon Sep 17 00:00:00 2001 From: Alex Leong Date: Fri, 21 Jun 2024 06:50:25 -0700 Subject: [PATCH] Make logHTTPHeaders optional (#12747) The `proxy.logHTTPHeaders` Helm variable supports two values: "insecure" and "off". However, if this value is absent entirely, validation will fail because it it not one of the supported values. This can cause issues with backwards compatibility. We make this value optional by adding "" as a legal value during validation. Leaving this value unset is equivalent to "off" which is the default value. Signed-off-by: Alex Leong --- charts/partials/templates/_proxy.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/partials/templates/_proxy.tpl b/charts/partials/templates/_proxy.tpl index a6bfdb9a2b950..282d80163db50 100644 --- a/charts/partials/templates/_proxy.tpl +++ b/charts/partials/templates/_proxy.tpl @@ -2,7 +2,7 @@ {{ if and .Values.proxy.nativeSidecar .Values.proxy.waitBeforeExitSeconds }} {{ fail "proxy.nativeSidecar and waitBeforeExitSeconds cannot be used simultaneously" }} {{- end }} -{{- if not (has .Values.proxy.logHTTPHeaders (list "insecure" "off")) }} +{{- if not (has .Values.proxy.logHTTPHeaders (list "insecure" "off" "")) }} {{- fail "logHTTPHeaders must be one of: insecure | off" }} {{- end }} {{- $trustDomain := (.Values.identityTrustDomain | default .Values.clusterDomain) -}}