-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #530 from vardhaman22/v1.1/add-validate-psp-instal…
…l-template [release/v1.1] added validate-psp-install and validate-install-crd templates
- Loading branch information
Showing
5 changed files
with
1,620 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} | ||
# {{- $found := dict -}} | ||
# {{- set $found "cis.cattle.io/v1/ClusterScan" false -}} | ||
# {{- set $found "cis.cattle.io/v1/ClusterScanBenchmark" false -}} | ||
# {{- set $found "cis.cattle.io/v1/ClusterScanProfile" false -}} | ||
# {{- set $found "cis.cattle.io/v1/ClusterScanReport" 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 -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#{{- if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 -}} | ||
#{{- if .Values.global.cattle.psp.enabled }} | ||
#{{- if not (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} | ||
#{{- fail "The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding." -}} | ||
#{{- end }} | ||
#{{- end }} | ||
#{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.