-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CIS] Check for PSP compatibility in target cluster #39851
Comments
We dont have a CIS scan profile supported for k8s 1.25 yet in the upstream kube-bench tool https://github.com/aquasecurity/kube-bench/blob/main/docs/platforms.md#cis-kubernetes-benchmark-support So we need to hold off supporting PSP removal and tests for k8s 1.25. |
We do, however, need to make sure the behavior is appropriate. |
@prachidamle @MKlimuszka Following is the behaviour seen on 1.25 clusters:
cc: @mitulshah-suse |
tested running scan for profile rke2-profile-hardened-1.23 on rke2-hardened cluster k8s: v1.25.6+rke2r1 using cis-benchmark 4.0.0-rc1 chart. |
@MKlimuszka I'm on the docs team, helping with the 2.7.2 release notes. If the linked PRs are merged, why is this still open? Is there more to be done? |
@martyav The comments above need to be documented in the release notes as expected failures for CIS scans on 1.25 clusters. |
@ronhorton can we close this as CIS chart has been tested with k8s 1.25? |
Pass We've tested this thoroughly ;) |
@ronhorton Working on release notes. Are the expected failures described above for RKE and RKE2 still valid, or can this be moved to bug fixes? |
Parent ticket: #39366
Kubernetes 1.25 drops support for PSP, so additional checks need to be added.
Rancher team 3 is following the proposal outlined in "Kubernetes v1.25 PSP to PSA migration proposal document"
Every chart that ships with a PSP must be changed to add a new condition checking for the PSP capability in the target cluster:
Capabilities check for Helm
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
This change allows the charts to still work with PSPs in Kubernetes versions prior to v1.25, and work in Kubernetes v1.25 or higher by skipping installation of PSPs.
Charts that need updating:
If a cluster role in a chart contains PSP's along with other permissions extra work may be needed to achieve the intended behavior of that role.
The text was updated successfully, but these errors were encountered: