UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit de059264 authored by Samuel Sarnowski's avatar Samuel Sarnowski Committed by Andrew Shoell
Browse files

Resolve "Istio injection for namespaces should be optional for all charts"

parent 9cdd8497
No related branches found
No related tags found
1 merge request!4880Resolve "Istio injection for namespaces should be optional for all charts"
Showing
with 20 additions and 37 deletions
......@@ -6,6 +6,6 @@ metadata:
app.kubernetes.io/name: argocd
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ dig "istio" "injection" "enabled" .Values.addons.argocd }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.argocd) "enabled")) }}
name: argocd
{{- end }}
......@@ -4,9 +4,7 @@ kind: Namespace
metadata:
name: authservice
labels:
{{- if .Values.istio.enabled }}
istio-injection: enabled
{{- end }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.authservice) "enabled")) }}
app.kubernetes.io/name: authservice
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -8,6 +8,6 @@ metadata:
app.kubernetes.io/name: cluster-auditor
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.clusterAuditor) "enabled")) }}
name: cluster-auditor
{{- end }}
......@@ -7,5 +7,5 @@ metadata:
app.kubernetes.io/name: eck-operator
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.eckOperator) "enabled")) }}
{{- end }}
{{- if .Values.elasticsearchKibana.enabled }}
{{- /* Default to istio being turned on, but disable if user sets istio to disable in the custom passthrough values.
We have to do it this way because ownership of "istio.enabled" is owned by the chart but also BigBang. Sourcing values from the passthrough values also means
we get to simplify the api space of BigBang just a little bit more.
*/ -}}
{{- $istio := .Values.elasticsearchKibana.values.istio | default dict }}
{{- $istioInjection := "enabled" }}
{{- if and (hasKey $istio "enabled") (not $istio.enabled) }}
{{- $istioInjection = "disabled" }}
{{- end }}
---
apiVersion: v1
kind: Namespace
......@@ -17,5 +8,5 @@ metadata:
app.kubernetes.io/name: logging
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ $istioInjection }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.elasticsearchKibana) "enabled")) }}
{{- end }}
......@@ -8,6 +8,6 @@ metadata:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.externalSecrets) "enabled")) }}
name: external-secrets
{{- end }}
......@@ -7,5 +7,5 @@ metadata:
app.kubernetes.io/name: fluentbit
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.fluentbit) "enabled")) }}
{{- end }}
......@@ -5,9 +5,7 @@ kind: Namespace
metadata:
name: {{ $pkg }}
labels:
{{- if .Values.istio.enabled }}
istio-injection: enabled
{{- end }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" (get .Values.addons $pkg)) "enabled")) }}
app.kubernetes.io/name: {{ $pkg }}
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -6,6 +6,6 @@ metadata:
app.kubernetes.io/name: gitlab-runner
app.kubernetes.io/component: "developer-tools"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ dig "istio" "injection" "enabled" .Values.addons.gitlabRunner }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.gitlabRunner) "enabled")) }}
name: gitlab-runner
{{- end }}
......@@ -6,6 +6,6 @@ metadata:
app.kubernetes.io/name: gitlab
app.kubernetes.io/component: "developer-tools"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ dig "istio" "injection" "enabled" .Values.addons.gitlab }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.gitlab) "enabled")) }}
name: gitlab
{{- end }}
......@@ -7,6 +7,6 @@ metadata:
app.kubernetes.io/name: monitoring
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ dig "istio" "injection" "enabled" .Values.grafana }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.grafana) "enabled")) }}
{{- end }}
......@@ -5,9 +5,7 @@ kind: Namespace
metadata:
name: {{ $pkg }}
labels:
{{- if .Values.istio.enabled }}
istio-injection: enabled
{{- end }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" (get .Values.addons $pkg)) "enabled")) }}
app.kubernetes.io/name: {{ $pkg }}
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -5,9 +5,7 @@ kind: Namespace
metadata:
name: {{ $pkg }}
labels:
{{- if .Values.istio.enabled }}
istio-injection: enabled
{{- end }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" (get .Values.addons $pkg)) "enabled")) }}
app.kubernetes.io/name: {{ $pkg }}
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -4,7 +4,7 @@ kind: Namespace
metadata:
name: jaeger
labels:
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.jaeger) "enabled")) }}
app.kubernetes.io/name: jaeger
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -5,7 +5,7 @@ kind: Namespace
metadata:
name: {{ $name }}
labels:
istio-injection: {{ dig "istio" "injection" "enabled" .Values.addons.keycloak }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.keycloak) "enabled")) }}
app.kubernetes.io/name: {{ $name }}
app.kubernetes.io/component: "security-tools"
{{- include "commonLabels" . | nindent 4 }}
......
......@@ -4,7 +4,7 @@ kind: Namespace
metadata:
name: kiali
labels:
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.kiali) "enabled")) }}
app.kubernetes.io/name: kiali
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -7,6 +7,6 @@ metadata:
app.kubernetes.io/name: {{ $pkg | kebabcase }}
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" (get .Values $pkg)) "enabled")) }}
name: kyverno-reporter
{{- end }}
\ No newline at end of file
......@@ -7,5 +7,5 @@ metadata:
app.kubernetes.io/name: logging
app.kubernetes.io/component: "core"
{{- include "commonLabels" . | nindent 4}}
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.loki) "enabled")) }}
{{- end }}
......@@ -6,7 +6,7 @@ kind: Namespace
metadata:
name: mattermost-operator
labels:
istio-injection: enabled
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" $mmOpValues) "enabled")) }}
app.kubernetes.io/name: mattermost-operator
app.kubernetes.io/component: "collaboration-tools"
{{- include "commonLabels" . | nindent 4}}
......
......@@ -7,6 +7,6 @@ metadata:
app.kubernetes.io/name: mattermost
app.kubernetes.io/component: "collaboration-tools"
{{- include "commonLabels" . | nindent 4}}
istio-injection: {{ dig "istio" "injection" "enabled" .Values.addons.mattermost }}
istio-injection: {{ ternary "enabled" "disabled" (and .Values.istio.enabled (eq (dig "istio" "injection" "enabled" .Values.addons.mattermost) "enabled")) }}
name: mattermost
{{- end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment