-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from grafana/add_validation
Add validation.yaml
- Loading branch information
Showing
3 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{{- 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 -}} | ||
|
||
{{- 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 -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters