Add validation.yaml
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
This commit is contained in:
parent
39a187457c
commit
67b13388a7
@ -42,7 +42,4 @@ dependencies:
|
||||
- name: minio
|
||||
repository: https://charts.min.io
|
||||
version: "5.0.11"
|
||||
tags:
|
||||
- local-logs
|
||||
- local-metrics
|
||||
- local-traces
|
||||
condition: local.minio.enabled
|
21
charts/meta-monitoring/templates/validate.yaml
Normal file
21
charts/meta-monitoring/templates/validate.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
{{- 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.endpoint) (or (empty .Values.cloud.logs.username) (empty .Values.cloud.logs.password)) -}}
|
||||
{{- fail "if cloud.logs is enabled then the endpoint, username and password have to be filled in" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq .Values.cloud.metrics.enabled true -}}
|
||||
{{- if or (empty .Values.cloud.metrics.endpoint) (or (empty .Values.cloud.metrics.username) (empty .Values.cloud.metrics.password)) -}}
|
||||
{{- fail "if cloud.metrics is enabled then the endpoint, username and password have to be filled in" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq .Values.cloud.traces.enabled true -}}
|
||||
{{- if or (empty .Values.cloud.traces.endpoint) (or (empty .Values.cloud.traces.username) (empty .Values.cloud.traces.password)) -}}
|
||||
{{- fail "if cloud.traces is enabled then the endpoint, username and password have to be filled in" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
@ -2,15 +2,8 @@ namespacesToMonitor:
|
||||
- loki
|
||||
- mimir
|
||||
- tempo
|
||||
clusterName: "observability" # TODO check if this can be derived
|
||||
clusterName: "meta-monitoring" # TODO check if this can be derived
|
||||
|
||||
# Turn on or off for local storing of metrics, logs or traces
|
||||
tags:
|
||||
local-logs: true
|
||||
local-metrics: true
|
||||
local-traces: true
|
||||
|
||||
# Unfortunately this is duplicate as Helm's tags and conditions fro dependencies are limited
|
||||
local:
|
||||
logs:
|
||||
enabled: false
|
||||
@ -18,6 +11,9 @@ local:
|
||||
enabled: false
|
||||
traces:
|
||||
enabled: false
|
||||
minio:
|
||||
enabled: false # This should be set to true if any of the previous is enabled
|
||||
|
||||
|
||||
cloud:
|
||||
logs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user