diff --git a/packages/rancher-monitoring/rancher-pushprox/charts/templates/validate-install-crd.yaml b/packages/rancher-monitoring/rancher-pushprox/charts/templates/validate-install-crd.yaml new file mode 100644 index 000000000..16abc2fa8 --- /dev/null +++ b/packages/rancher-monitoring/rancher-pushprox/charts/templates/validate-install-crd.yaml @@ -0,0 +1,14 @@ +#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} +# {{- $found := dict -}} +# {{- set $found "monitoring.coreos.com/v1/ServiceMonitor" 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 Prometheus Operator CRDs before installing this chart." "" -}} +# {{- end -}} +# {{- end -}} +#{{- end -}}