-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix: issue with apiVersion not being set for psp #5480
fix: issue with apiVersion not being set for psp #5480
Conversation
|
Welcome @ViktorCollin! |
Well, there's no need to delete a valid block I believe. There's a simple typo in the construction, where else if is required instead of extra if block. This works fine:
|
It is not only that it should have been and if else statement is. The bigger problem is that psp has never graduated to GA, it went from beta to removed directly. That means that the |
Thanks for this, can you please squash the commits down to a single commit, happy to get this merged then. |
make sure to use `apiVersion: policy/v1beta1` for PodSecurityPolicy when kubernetes version is above 1.10. This fix will work (with a deprecation warning) for cluster version below 1.25 when psp is removed.
@gjtempleton commits are now squashed |
Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gjtempleton, ViktorCollin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Make sure to use
apiVersion: policy/v1beta1
for PodSecurityPolicy when kubernetes version is above 1.10. This fix will work (with a deprecation warning) for cluster version below 1.25 when psp is removed.Which issue(s) this PR fixes:
Fixes #5364
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: