Michel Hollands d9fc9e4f4e Add secret and configmap for credentials and endpoints
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-01 13:15:50 +01:00

40 lines
1.6 KiB
YAML

{{- if not (eq .Values.local.minio.enabled (or .Values.local.traces.enabled (or .Values.local.logs.enabled .Values.local.metrics.enabled))) -}}
{{- fail "minio.enabled should be set to true if any of the the local databases is enabled " -}}
{{- end -}}
{{- if eq .Values.cloud.logs.enabled true -}}
{{- if or (empty .Values.cloud.logs.secret) (empty .Values.cloud.logs.endpointConfigmap) -}}
{{- fail "if cloud.logs is enabled then the secret and endpoint config map have to be filled in" -}}
{{- end -}}
{{- end -}}
{{- if eq .Values.cloud.metrics.enabled true -}}
{{- if or (empty .Values.cloud.metrics.secret) (empty .Values.cloud.logs.endpointConfigmap) -}}
{{- fail "if cloud.metrics is enabled then the secret and endpoint config map have to be filled in" -}}
{{- end -}}
{{- end -}}
{{- if eq .Values.cloud.traces.enabled true -}}
{{- if or (empty .Values.cloud.traces.secret) (empty .Values.cloud.logs.endpointConfigmap) -}}
{{- fail "if cloud.traces is enabled then the secret and endpoint config map 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 -}}
{{- if empty .Values.namespacesToMonitor -}}
{{- fail "No namespaces have been specified in namespacesToMonitor" -}}
{{- end -}}