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

PodSecurityPolicy deprecated in Kubernetes 1.21 #4112

Closed
pietervincken opened this issue Jul 22, 2021 · 18 comments · Fixed by #5536
Closed

PodSecurityPolicy deprecated in Kubernetes 1.21 #4112

pietervincken opened this issue Jul 22, 2021 · 18 comments · Fixed by #5536
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@pietervincken
Copy link

Expected Behavior

The released deployment manifest doesn't have deprecated resources listed in it.

Actual Behavior

PodSecurityPolicy tekton-pipelines is listed in the deployment manifest which is a deprecated resource as of 1.21.

Steps to Reproduce the Problem

  1. Download the latest release yaml (tested with 0.26.0)

Additional Info

  • Kubernetes version: 1.21

    Output of kubectl version:
    N/A

  • Tekton Pipeline version:

0.26.0

@pietervincken pietervincken added the kind/bug Categorizes issue or PR as related to a bug. label Jul 22, 2021
@vdemeester
Copy link
Member

@pietervincken thanks for the issue. Indeed, I think we should just remove this from the config folder (and thus from the released yamls).

/cc @tektoncd/core-maintainers

@vdemeester vdemeester added this to the Pipelines v0.27 milestone Jul 23, 2021
@dibyom
Copy link
Member

dibyom commented Jul 27, 2021

@afrittoli
Copy link
Member

@vdemeester I will move this to the next milestone. Let me know if there is any concern.

@ghost
Copy link

ghost commented Nov 30, 2021

Looks like the replacement feature in Kubernetes will be called "PodSecurity Admission". Released as alpha in 1.22

@lbernick
Copy link
Member

/priority important-soon

@tekton-robot tekton-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Dec 13, 2021
@afrittoli
Copy link
Member

Discussed during the Pipeline WG:

  • we shall had support for the new mechanism but keep PSP in parallel
  • both methods can stay together until Pod Security Admission is stable

@afrittoli afrittoli removed this from the Pipelines v0.33 milestone Feb 8, 2022
@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 9, 2022
@nanoq66
Copy link

nanoq66 commented May 19, 2022

/remove-lifecycle stale
still relevant IMHO k8s 1.25 is getting closer ;)

@vdemeester
Copy link
Member

If PodSecurityPolicy are removed in 1.25, then we need to either remove it for 0.36 or 0.37 (any release that would be in the 1.25 timeframe more or less) or be able to generate release with and without it.
I can re-open #4122 if need be.

@dibyom dibyom removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 28, 2022
@dibyom
Copy link
Member

dibyom commented Jun 28, 2022

I think we need to do this soon - we could point users to https://appvia.github.io/psp-migration/ to migrate to an alternate policy engine. We could also see if we can enable https://kubernetes.io/docs/concepts/security/pod-security-admission/

@abayer
Copy link
Contributor

abayer commented Aug 10, 2022

Resurrecting this again - looks like PodSecurityPolicy has been removed in k8s 1.25, so we need to push this. I'm putting this in the v0.39 milestone, but am going to assume it'll end up slipping to v0.40 just due to time.

@abayer abayer added this to the Pipelines v0.40 milestone Aug 10, 2022
@abayer
Copy link
Contributor

abayer commented Aug 10, 2022

/priority critical-urgent

Actually, I just put it in v0.40, but am also bumping the priority.

@tekton-robot tekton-robot added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Aug 10, 2022
@pritidesai
Copy link
Member

@jerop to find someone who can help with this!

@pritidesai
Copy link
Member

The replacement is beta which is reasonable to replace with

@JeromeJu
Copy link
Member

/assign

@JeromeJu
Copy link
Member

Drafted the doc WIP for PSP migration.

According to the references in the doc, here are the aspects according to current PSP that PSA might not cover:

  • The seLinux config requires the privileged level in PSA, which might be different from our privileged setting in PSP.
  • The supplementalGroups/ fsGroup rules are set as a range with mustRunAs rule in PSP but not specified in PSA.

@JeromeJu
Copy link
Member

JeromeJu commented Sep 8, 2022

I think we should go for the 1st option in the doc of using PSA with OPA as complement for some of the specifications eg. seLinux supplementalGroup fsGroup as the other two options would both introduce more dependencies that we don’t want.

Would appreciate it if people could take a look at this doc and help with some opinions!

@dibyom
Copy link
Member

dibyom commented Sep 20, 2022

From Pipelines WG:

  1. Remove PSP
  2. Add a PSA to do as much as the existing PSP can
  3. Document how to achieve the same behavior with an alternative (OPA or another policy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
Status: Done