diff --git a/helm-chart/templates/12-config-map.yaml b/helm-chart/templates/12-config-map.yaml index 70c838974..b0f8e57c1 100644 --- a/helm-chart/templates/12-config-map.yaml +++ b/helm-chart/templates/12-config-map.yaml @@ -16,5 +16,5 @@ data: AUTH_APPROVED_TENANTS: '{{ gt (len .Values.tap.auth.approvedTenants) 0 | ternary (join "," .Values.tap.auth.approvedTenants) "" }}' TELEMETRY_DISABLED: '{{ not .Values.tap.telemetry.enabled | ternary "true" "" }}' REPLAY_DISABLED: '{{ .Values.tap.replayDisabled | ternary "true" "" }}' - GLOBAL_FILTER: '{{ .Values.tap.globalFilter }}' + GLOBAL_FILTER: {{ include "kubeshark.escapeDoubleQuotes" .Values.tap.globalFilter | quote }} TRAFFIC_SAMPLE_RATE: '{{ .Values.tap.trafficSampleRate }}' diff --git a/helm-chart/templates/_helpers.tpl b/helm-chart/templates/_helpers.tpl index 16b1014a9..ab5151662 100644 --- a/helm-chart/templates/_helpers.tpl +++ b/helm-chart/templates/_helpers.tpl @@ -48,3 +48,11 @@ Create the name of the service account to use {{- define "kubeshark.serviceAccountName" -}} {{- printf "%s-service-account" .Release.Name }} {{- end }} + +{{/* +Escape double quotes in a string +*/}} +{{- define "kubeshark.escapeDoubleQuotes" -}} + {{- regexReplaceAll "\"" . "\"" -}} +{{- end -}} +