Skip to content

Commit 68e71e4

Browse files
committed
added validate-install-crd template
1 parent c88d47f commit 68e71e4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}}
2+
# {{- $found := dict -}}
3+
# {{- set $found "cis.cattle.io/v1/ClusterScan" false -}}
4+
# {{- set $found "cis.cattle.io/v1/ClusterScanBenchmark" false -}}
5+
# {{- set $found "cis.cattle.io/v1/ClusterScanProfile" false -}}
6+
# {{- set $found "cis.cattle.io/v1/ClusterScanReport" false -}}
7+
# {{- range .Capabilities.APIVersions -}}
8+
# {{- if hasKey $found (toString .) -}}
9+
# {{- set $found (toString .) true -}}
10+
# {{- end -}}
11+
# {{- end -}}
12+
# {{- range $_, $exists := $found -}}
13+
# {{- if (eq $exists false) -}}
14+
# {{- required "Required CRDs are missing. Please install the corresponding CRD chart before installing this chart." "" -}}
15+
# {{- end -}}
16+
# {{- end -}}
17+
#{{- end -}}

0 commit comments

Comments
 (0)