diff --git a/chart/templates/certmanager/cert-manager-helmrelease.yaml b/chart/templates/certmanager/cert-manager-helmrelease.yaml index 9fe04b15609cdb67d60ec0be8dedfa4af094b89a..7b10992828499bc8e6e0f6bce627d135a6ec3744 100644 --- a/chart/templates/certmanager/cert-manager-helmrelease.yaml +++ b/chart/templates/certmanager/cert-manager-helmrelease.yaml @@ -37,4 +37,5 @@ spec: - name: env-values kind: Secret optional: true + {{- end }} \ No newline at end of file diff --git a/chart/templates/istio/istio-controlplane-helmrelease.yaml b/chart/templates/istio/istio-controlplane-helmrelease.yaml index 5db3fb26df0db5bdc96564b554e1996b311e20d3..c041814d2f39a82b898915a243f438487623a626 100644 --- a/chart/templates/istio/istio-controlplane-helmrelease.yaml +++ b/chart/templates/istio/istio-controlplane-helmrelease.yaml @@ -42,8 +42,11 @@ spec: hostname: {{ .Values.global.hostname }} dependsOn: - - name: {{ .Release.Name }}-gatekeeper - namespace: {{ .Release.Namespace }} - name: {{ .Release.Name }}-istio-operator namespace: {{ .Release.Namespace }} + + {{- if .Values.gatekeeper.enabled }} + - name: {{ .Release.Name }}-gatekeeper + namespace: {{ .Release.Namespace }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/istio/istio-operator-helmrelease.yaml b/chart/templates/istio/istio-operator-helmrelease.yaml index 1307f7ff84bb2518c29d84e44c6ed950cc6e485f..ea9a0480d4e72208712fe56053539c137dd23f27 100644 --- a/chart/templates/istio/istio-operator-helmrelease.yaml +++ b/chart/templates/istio/istio-operator-helmrelease.yaml @@ -42,7 +42,10 @@ spec: kind: Secret optional: true + {{- if .Values.gatekeeper.enabled }} dependsOn: - name: {{ .Release.Name }}-gatekeeper namespace: {{ .Release.Namespace }} + {{- end }} + {{- end }} \ No newline at end of file diff --git a/chart/templates/logging/eck-operator-helmrelease.yaml b/chart/templates/logging/eck-operator-helmrelease.yaml index b15eb2f9d9ec9cd225a4a329711a719afd87c86d..1a452fff6773369b16de7d6f03760eda44b58058 100644 --- a/chart/templates/logging/eck-operator-helmrelease.yaml +++ b/chart/templates/logging/eck-operator-helmrelease.yaml @@ -38,7 +38,9 @@ spec: kind: Secret optional: true + {{- if .Values.gatekeeper.enabled }} dependsOn: - name: {{ .Release.Name }}-gatekeeper namespace: {{ .Release.Namespace }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/logging/efk-helmrelease.yaml b/chart/templates/logging/efk-helmrelease.yaml index 0bf69382cdcabb19b90cd8b6b5e222424dd06dad..631600de78521fa4299c34932974cb1b768543b9 100644 --- a/chart/templates/logging/efk-helmrelease.yaml +++ b/chart/templates/logging/efk-helmrelease.yaml @@ -41,13 +41,20 @@ spec: values: hostname: {{ .Values.global.hostname }} + {{/* ECK and Logging _always_ depend on .Values.logging being enabled, so can assume they exist here */}} dependsOn: - - name: {{ .Release.Name }}-gatekeeper - namespace: {{ .Release.Namespace }} - - name: {{ .Release.Name }}-istio - namespace: {{ .Release.Namespace }} - name: {{ .Release.Name }}-eck-operator namespace: {{ .Release.Namespace }} - name: {{ .Release.Name }}-logging-operator namespace: {{ .Release.Namespace }} + + {{- if .Values.gatekeeper.enabled }} + - name: {{ .Release.Name }}-gatekeeper + namespace: {{ .Release.Namespace }} + {{- end }} + + {{- if .Values.istio.enabled }} + - name: {{ .Release.Name }}-istio + namespace: {{ .Release.Namespace }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/logging/logging-operator-helmrelease.yaml b/chart/templates/logging/logging-operator-helmrelease.yaml index 2a21cfc383c39eb87085f946133d244e073836e7..c936a588790b7f0c2a7ee952b7a6ae456692ac23 100644 --- a/chart/templates/logging/logging-operator-helmrelease.yaml +++ b/chart/templates/logging/logging-operator-helmrelease.yaml @@ -33,7 +33,9 @@ spec: values: createCustomResource: false + {{- if .Values.gatekeeper.enabled }} dependsOn: - name: {{ .Release.Name }}-gatekeeper namespace: {{ .Release.Namespace }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/monitoring/kube-prometheus-stack-helmrelease.yaml b/chart/templates/monitoring/kube-prometheus-stack-helmrelease.yaml index 6170847a1215e6b84f80560e4847446bc1a1b11e..e58ebc06a09de3b4231ce10d7ae72ca389ff054f 100644 --- a/chart/templates/monitoring/kube-prometheus-stack-helmrelease.yaml +++ b/chart/templates/monitoring/kube-prometheus-stack-helmrelease.yaml @@ -75,7 +75,10 @@ spec: kind: Secret optional: true + # TODO: DRY this up + {{- if .Values.gatekeeper.enabled }} dependsOn: - name: {{ .Release.Name }}-gatekeeper namespace: {{ .Release.Namespace }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/twistlock/twistlock-helmrelease.yaml b/chart/templates/twistlock/twistlock-helmrelease.yaml index c642d8b031d542a46ff450fdc6d7836435ed0b4f..a04a5154ddd9955e56d395f9b90022816b21d844 100644 --- a/chart/templates/twistlock/twistlock-helmrelease.yaml +++ b/chart/templates/twistlock/twistlock-helmrelease.yaml @@ -42,11 +42,18 @@ spec: hostname: {{ .Values.global.hostname }} prometheus: servicemonitor: - enabled: true + enabled: {{ .Values.monitoring.enabled }} + # TODO: DRY this up + {{- if or .Values.gatekeeper.enabled .Values.istio.enabled }} dependsOn: + {{- if .Values.gatekeeper.enabled }} - name: {{ .Release.Name }}-gatekeeper namespace: {{ .Release.Namespace }} + {{- end }} + {{- if .Values.istio.enabled }} - name: {{ .Release.Name }}-istio namespace: {{ .Release.Namespace }} + {{- end }} + {{- end }} {{- end }} \ No newline at end of file