Skip to content
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: only install PodSecurityPolicy if the API is available #1134

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

smlx
Copy link
Contributor

@smlx smlx commented Nov 23, 2022

Q A
Bug fix? yes
New feature? no
API breaks? no
Deprecations? yes
Related tickets Closes #1077
License Apache 2.0

What's in this PR?

This PR adds a check for the PodSecurityPolicy API in the chart, and avoids trying to use that API if it is not available. This API is removed in k8s v1.25.

Additional context

I tested this in k8s v1.22 where the PSP is still installed, and in v1.25 where the PSP is not installed anymore. This makes the chart usable in k8s v1.25+.

Checklist

  • Related Helm chart(s) updated (if needed)

@ahma ahma requested review from ahma and siliconbrain November 23, 2022 22:01
Copy link
Contributor

@ahma ahma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm Thanks @smlx

@ahma ahma requested a review from bshifter November 25, 2022 13:54
Copy link
Contributor

@bshifter bshifter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ahma ahma merged commit 71c96ae into kube-logging:master Nov 25, 2022
@smlx smlx deleted the deprecate-chart-psp branch November 28, 2022 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
4 participants