blob: 1e9cbb8bb72122431bda3cd499481eed7ef1d159 [file] [log] [blame]
Mohammed Naser9ad0d462023-01-15 20:36:37 -05001{{/* validate hubble config */}}
2{{- if .Values.hubble.ui.enabled }}
3 {{- if not .Values.hubble.relay.enabled }}
4 {{ fail "Hubble UI requires .Values.hubble.relay.enabled=true" }}
5 {{- end }}
6{{- end }}
7{{- if .Values.hubble.relay.enabled }}
8 {{- if not .Values.hubble.enabled }}
9 {{ fail "Hubble Relay requires .Values.hubble.enabled=true" }}
10 {{- end }}
11{{- end }}
12
13{{/* validate service monitoring CRDs */}}
14{{- if and (.Values.prometheus.enabled) (or (.Values.prometheus.serviceMonitor.enabled) (.Values.operator.prometheus.serviceMonitor.enabled)) }}
15 {{- if not (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }}
16 {{ fail "Service Monitor requires monitoring.coreos.com/v1 CRDs. Please refer to https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml" }}
17 {{- end }}
18{{- end }}