diff --git a/chart/templates/twistlock/namespace.yaml b/chart/templates/twistlock/namespace.yaml index be18dc68e926566fa1979deb1c6939c655c54654..e23245f9ae40bf0e72a2bc4ad860569e7b553f40 100644 --- a/chart/templates/twistlock/namespace.yaml +++ b/chart/templates/twistlock/namespace.yaml @@ -7,5 +7,5 @@ metadata: app.kubernetes.io/name: twistlock app.kubernetes.io/component: "security" {{- include "commonLabels" . | nindent 4}} - istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.twistlock) "enabled")) }} + istio-injection: {{ ternary "enabled" "disabled" (and (include "istioEnabled" .) (eq (dig "istio" "injection" "enabled" .Values.twistlock) "enabled")) }} {{- end }} \ No newline at end of file diff --git a/chart/templates/twistlock/values.yaml b/chart/templates/twistlock/values.yaml index a2a95fb21ed66158247bd976632d56f821f0fb7d..7fed07b82fb1cfd07a294cc16f1441454fa94cd0 100644 --- a/chart/templates/twistlock/values.yaml +++ b/chart/templates/twistlock/values.yaml @@ -28,6 +28,8 @@ imagePullSecrets: networkPolicies: enabled: {{ .Values.networkPolicies.enabled }} + istioNamespaceSelector: + {{ include "istioNamespaceSelector" . | nindent 4 }} ingressLabels: {{- $gateway := default "public" .Values.twistlock.ingress.gateway }} {{- $default := dict "app" (dig "gateways" $gateway "ingressGateway" nil .Values.istio) "istio" nil }} @@ -36,7 +38,7 @@ networkPolicies: nodeCidr: {{ .Values.networkPolicies.nodeCidr }} istio: - enabled: {{ .Values.istio.enabled }} + enabled: {{ include "istioEnabled" . }} hardened: enabled: {{ or (dig "istio" "hardened" "enabled" false .Values.twistlock.values) @@ -44,7 +46,7 @@ istio: }} console: gateways: - - istio-system/{{ default "public" .Values.twistlock.ingress.gateway }} + - {{ include "istioGatewayNamespace" . }}/{{ default (include "istioPublicGateway" . ) .Values.twistlock.ingress.gateway }} {{- if .Values.istio.enabled }} annotations: