rancher-charts/charts/rancher-monitoring/9.4.201/templates/validate-install-crd.yaml

20 lines
900 B
YAML

#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
# {{- $found := dict -}}
# {{- set $found "monitoring.coreos.com/v1/Alertmanager" false -}}
# {{- set $found "monitoring.coreos.com/v1/PodMonitor" false -}}
# {{- set $found "monitoring.coreos.com/v1/Prometheus" false -}}
# {{- set $found "monitoring.coreos.com/v1/PrometheusRule" false -}}
# {{- set $found "monitoring.coreos.com/v1/ServiceMonitor" false -}}
# {{- set $found "monitoring.coreos.com/v1/ThanosRuler" false -}}
# {{- range .Capabilities.APIVersions -}}
# {{- if hasKey $found (toString .) -}}
# {{- set $found (toString .) true -}}
# {{- end -}}
# {{- end -}}
# {{- range $_, $exists := $found -}}
# {{- if (eq $exists false) -}}
# {{- required "Required CRDs are missing. Please install the rancher-monitoring-crd chart before installing this chart." "" -}}
# {{- end -}}
# {{- end -}}
#{{- end -}}