rancher-charts/charts/rancher-gatekeeper/102.0.0+up3.10.0/templates/validate-install-crd.yaml

23 lines
1.2 KiB
YAML

#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
# {{- $found := dict -}}
# {{- set $found "mutations.gatekeeper.sh/v1/Assign" false -}}
# {{- set $found "mutations.gatekeeper.sh/v1/AssignMetadata" false -}}
# {{- set $found "config.gatekeeper.sh/v1alpha1/Config" false -}}
# {{- set $found "status.gatekeeper.sh/v1beta1/ConstraintPodStatus" false -}}
# {{- set $found "templates.gatekeeper.sh/v1/ConstraintTemplate" false -}}
# {{- set $found "status.gatekeeper.sh/v1beta1/ConstraintTemplatePodStatus" false -}}
# {{- set $found "expansion.gatekeeper.sh/v1alpha1/ExpansionTemplate" false -}}
# {{- set $found "mutations.gatekeeper.sh/v1/ModifySet" false -}}
# {{- set $found "status.gatekeeper.sh/v1beta1/MutatorPodStatus" false -}}
# {{- set $found "externaldata.gatekeeper.sh/v1alpha1/Provider" 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 corresponding CRD chart before installing this chart." "" -}}
# {{- end -}}
# {{- end -}}
#{{- end -}}