Skip to content

Commit 4ac440f

Browse files
update validation templates
1 parent 386e2c9 commit 4ac440f

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

charts/everest/templates/_helpers.tpl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ Expand the name of the chart.
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

8+
9+
{{/*
10+
Mutual exclusion validation
11+
*/}}
12+
{{- define "everest.validateInputs" -}}
13+
{{- if and .Values.pmm.enabled .Values.pmm3.enabled -}}
14+
{{ fail "Only one of pmm.enabled or pmm3.enabled may be true. They are mutually exclusive." }}
15+
{{- end }}
16+
{{- end }}
17+
18+
819
{{/*
920
Allows overriding the install namespace in combined charts.
1021
*/}}
@@ -129,7 +140,3 @@ tls.crt: {{ $cert.Cert | b64enc }}
129140
ca.crt: {{ $ca.Cert | b64enc }}
130141
{{- end }}
131142
{{- end }}
132-
133-
{{- if and .Values.pmm.enabled .Values.pmm3.enabled -}}
134-
{{ fail "Only one of pmm.enabled or pmm3.enabled may be true. They are mutually exclusive." }}
135-
{{- end }}

charts/everest/templates/everest-operator/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{ include "everest.validateInputs" . }}
2+
13
apiVersion: apps/v1
24
kind: Deployment
35
metadata:

0 commit comments

Comments
 (0)