Skip to content

Commit

Permalink
add validation of deploymentMode
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang Xin <[email protected]>
  • Loading branch information
rim99 committed Jan 19, 2025
1 parent 10730d6 commit 3523936
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bitnami/grafana-tempo/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ Compile all warnings into a single message.
*/}}
{{- define "grafana-tempo.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "grafana-tempo.validateValues.deploymentMode" .) -}}
{{- $messages := append $messages (include "grafana-tempo.validateValues.vulture" .) -}}
{{- $messages := append $messages (include "grafana-tempo.validateValues.memcached" .) -}}
{{- $messages := without $messages "" -}}
Expand All @@ -200,6 +201,14 @@ Compile all warnings into a single message.
{{- end -}}
{{- end -}}

{{/* Validate values of Grafana Tempo - DeploymentMode */}}
{{- define "grafana-tempo.validateValues.deploymentMode" -}}
{{- if and (ne .Values.tempo.deploymentMode "microservices") (ne .Values.tempo.deploymentMode "scalingMonolithic") }}
grafana-tempo: DeploymentMode
Allowed deploymentMode values are 'microservices' and 'scalingMonolithic'. Found: {{ .Values.tempo.deploymentMode }}
{{- end }}
{{- end -}}

{{/* Validate values of Grafana Tempo - Memcached */}}
{{- define "grafana-tempo.validateValues.vulture" -}}
{{- if not (and .Values.vulture.enabled .Values.tempo.traces.jaeger.grpc) -}}
Expand Down

0 comments on commit 3523936

Please sign in to comment.