rancher-charts/charts/longhorn/101.1.0+up1.3.2/templates/validate-install-crd.yaml

30 lines
1.5 KiB
YAML

#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
# {{- $found := dict -}}
# {{- set $found "longhorn.io/v1beta1/BackingImageDataSource" false -}}
# {{- set $found "longhorn.io/v1beta1/BackingImageManager" false -}}
# {{- set $found "longhorn.io/v1beta1/BackingImage" false -}}
# {{- set $found "longhorn.io/v1beta1/Backup" false -}}
# {{- set $found "longhorn.io/v1beta1/BackupTarget" false -}}
# {{- set $found "longhorn.io/v1beta1/BackupVolume" false -}}
# {{- set $found "longhorn.io/v1beta1/EngineImage" false -}}
# {{- set $found "longhorn.io/v1beta1/Engine" false -}}
# {{- set $found "longhorn.io/v1beta1/InstanceManager" false -}}
# {{- set $found "longhorn.io/v1beta1/Node" false -}}
# {{- set $found "longhorn.io/v1beta2/Orphan" false -}}
# {{- set $found "longhorn.io/v1beta1/RecurringJob" false -}}
# {{- set $found "longhorn.io/v1beta1/Replica" false -}}
# {{- set $found "longhorn.io/v1beta1/Setting" false -}}
# {{- set $found "longhorn.io/v1beta1/ShareManager" false -}}
# {{- set $found "longhorn.io/v1beta2/Snapshot" false -}}
# {{- set $found "longhorn.io/v1beta1/Volume" 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 -}}