chore: remove PSP and migrate to PSA#2174
Conversation
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
For k8s versions < v1.25, users might still need PSP. Maybe conditionally delete it based on k8s version? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2174 +/- ##
==========================================
+ Coverage 54.44% 54.49% +0.05%
==========================================
Files 111 111
Lines 9529 9529
==========================================
+ Hits 5188 5193 +5
+ Misses 3945 3941 -4
+ Partials 396 395 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@ritazh updated the PR description to clarify we are deploying PSP if |
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
| "pod-security.kubernetes.io/warn=restricted", | ||
| "pod-security.kubernetes.io/warn-version=latest", | ||
| "pod-security.kubernetes.io/enforce=restricted", | ||
| "pod-security.kubernetes.io/enforce-version=v1.24"] |
There was a problem hiding this comment.
Should we get it via Capabilities.KubeVersion.Version
There was a problem hiding this comment.
we know we are compatible with 1.24, but we won't know it for future versions. That's why enforce is pinned while audit and warn is latest
|
Some parts are missing, see #2351 |
|
@sozercan @ritazh Before running helm upgrade, updated psp to false in values.yaml Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s) Kindly let me know, am I missing anything. |
|
I have the same issue @srmars . Want to redeploy gate-keeper with helm chart on a v1.25 k8s cluster. |
|
I know your comments were 1 year ago, hopefull you had found how to fix it. in case not, please have a look at this https://ranchermanager.docs.rancher.com/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/pod-security-standards#install-helm-mapkubeapis. although your clusters may not run on rancher, however this doc still applies. you should remove psp before upgraded to k8s 1.25 as per https://ranchermanager.docs.rancher.com/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/pod-security-standards#removing-podsecuritypolicies-from-rancher-maintained-apps--marketplace-workloads. |
Signed-off-by: Sertac Ozercan sozercan@gmail.com
What this PR does / why we need it:
policy/v1beta1API exists (k8s < 1.25), PSP will still be deployed usingpsp.enabledvalue (enabled by default).policy/v1by defaultrestrictedpod security standards for audit/warn/enforce ingatekeeper-system.Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when the PR gets merged):Fixes #2147
Special notes for your reviewer:
Since Helm creates the namespace, we can't add PSA annotations. Should that be part of docs or maybe we can do this with a helm hook?Added a post-install helm hook. However, pre-install helm hook will be triggered too early (before namespace creation) and post-install will be too late (after deployment), but we'll have labels in the GK namespace after post-install.