Factory/sriov-network-operator-chart/templates/validate-install-crd.yaml

20 lines
1.0 KiB
YAML

#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
# {{- $found := dict -}}
# {{- set $found "sriovnetwork.openshift.io/v1/OVSNetwork" false -}}
# {{- set $found "sriovnetwork.openshift.io/v1/SriovIBNetwork" false -}}
# {{- set $found "sriovnetwork.openshift.io/v1/SriovNetworkNodePolicy" false -}}
# {{- set $found "sriovnetwork.openshift.io/v1/SriovNetworkNodeState" false -}}
# {{- set $found "sriovnetwork.openshift.io/v1/SriovNetworkPoolConfig" false -}}
# {{- set $found "sriovnetwork.openshift.io/v1/SriovNetwork" false -}}
# {{- set $found "sriovnetwork.openshift.io/v1/SriovOperatorConfig" 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 -}}