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

add PodSecurityPolicy removal note in docs #2241

Merged
merged 7 commits into from
Aug 30, 2023
Merged

Conversation

BBBmau
Copy link
Contributor

@BBBmau BBBmau commented Aug 23, 2023

Description

Fixes #2234

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@jrhouston
Copy link
Collaborator

Perhaps we should also set a DeprecationMessage in the schema for this resource, as we will want to remove this in a future major version of the provider.

Copy link
Member

@alexsomesan alexsomesan left a comment

Choose a reason for hiding this comment

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

+1 to what @jrhouston said. We should to surface the deprecation to users at runtime. Ideally we also gate the use of this resource on the API server version. We have precedent of that in some other resources.

Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

I would add my 5 cents here.

This is not the only resource that got deprecated in this or that Kubernetes version, we have a few of them. I would vote for a more standardized approach. We could have a section in our documentation on top that mentions the target Kubernetes release of the resource that gets deprecated. Usually, this information is available a few releases in advance. It also would be nice to mention whether there is a successor resource in our provide if applicable, so practitioners can plan migration ahead. And this all should be synchronized with the resources warning messages.

I think it could be a part of the documentation improvement epic, along with the kind and API versions that the resource implements.

@jrhouston
Copy link
Collaborator

Follow up discussion: instead of DeprecationMessage we should check the cluster version and:

  1. If the version is 1.21+ return a warning diagnostic saying the resource has been deprecated
  2. if the version is 1.25+ return an error saying the resource cannot be used on cluster versions 1.25+

@github-actions github-actions bot added size/S and removed size/XS labels Aug 23, 2023
@BBBmau BBBmau requested a review from jrhouston August 23, 2023 21:17
@github-actions github-actions bot added size/XS and removed size/S labels Aug 30, 2023
@BBBmau BBBmau merged commit 67cf9a9 into main Aug 30, 2023
12 checks passed
@BBBmau BBBmau deleted the add-note-podsecuritypolicy branch August 30, 2023 18:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in documentation for Pod Security Policies
4 participants