From 116586e383749eed2cb635b16ed929b1b9864d6e Mon Sep 17 00:00:00 2001 From: Michel Hollands Date: Thu, 6 Jul 2023 14:08:15 +0100 Subject: [PATCH] Add check to if anything is enabled Signed-off-by: Michel Hollands --- charts/meta-monitoring/templates/validate.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/charts/meta-monitoring/templates/validate.yaml b/charts/meta-monitoring/templates/validate.yaml index 3711ee9..7b2b9a8 100644 --- a/charts/meta-monitoring/templates/validate.yaml +++ b/charts/meta-monitoring/templates/validate.yaml @@ -19,3 +19,17 @@ {{- fail "if cloud.traces is enabled then the endpoint, username and password have to be filled in" -}} {{- end -}} {{- end -}} + +{{- if eq .Values.cloud.traces.enabled false -}} +{{- if eq .Values.cloud.metrics.enabled false -}} +{{- if eq .Values.cloud.logs.enabled false -}} +{{- if eq .Values.local.traces.enabled false -}} +{{- if eq .Values.local.metrics.enabled false -}} +{{- if eq .Values.local.logs.enabled false -}} + {{- fail "nothing has been enabled" -}} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}}