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

Container configurations need to be updated for PodSecurity on k8s 1.23+ #5603

Closed
abayer opened this issue Oct 5, 2022 · 8 comments · Fixed by #5652
Closed

Container configurations need to be updated for PodSecurity on k8s 1.23+ #5603

abayer opened this issue Oct 5, 2022 · 8 comments · Fixed by #5652
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@abayer
Copy link
Contributor

abayer commented Oct 5, 2022

I've verified this on 1.23 and 1.24 in clusters created via kind. The error message is the same.

The deployments fail to create pods - from kubectl get deployment -n tekton-pipelines tekton-pipelines-controller:

    message: 'pods "tekton-pipelines-controller-fcfbc554b-9fcdj" is forbidden: violates
      PodSecurity "restricted:latest": seLinuxOptions (pod set forbidden securityContext.seLinuxOptions:
      ), unrestricted capabilities (container "tekton-pipelines-controller" must set
      securityContext.capabilities.drop=["ALL"]), seccompProfile (pod or container
      "tekton-pipelines-controller" must set securityContext.seccompProfile.type to
      "RuntimeDefault" or "Localhost")'

This is due to b506b77#diff-d98ea73731da6e49a8552d6917d796aab6613198b269eda1b4bbfb4b53d90111R22, added in #5536 as part of addressing #4112.

While the move to PodSecurity is being reverted in #5605, this issue will be used to track the additional container configuration work needed to move to PodSecurity.

@abayer abayer added 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. labels Oct 5, 2022
@abayer abayer added this to the Pipelines v0.41 milestone Oct 5, 2022
@abayer
Copy link
Contributor Author

abayer commented Oct 5, 2022

cc @tektoncd/core-maintainers - this definitely feels like a blocker for v0.41.0.

@abayer
Copy link
Contributor Author

abayer commented Oct 5, 2022

cc @JeromeJu

@abayer abayer changed the title main (pre-v0.41.0) doesn't deploy on k8s 1.24 main (pre-v0.41.0) doesn't deploy on k8s 1.23+ Oct 5, 2022
@abayer
Copy link
Contributor Author

abayer commented Oct 5, 2022

Ok, so I'm not sure what exactly we need to change on the controller/webhook/resolver container configurations, or whether we can do those changes while still working on k8s 1.22. The right answer may be to revert #5536 for now, move v0.41 to requiring k8s 1.23, and then bringing back #5536 and whatever additional configuration is needed on the containers for v0.42.

@lbernick
Copy link
Member

lbernick commented Oct 5, 2022

It sounds like we should be able to fix this without bumping the min required version by setting the correct security context for the pipelines controller (although I think moving our HPA to v2 will require 1.23 anyway). I'll work with Jerome to try to address this but it probably does make sense to revert until this can be addressed.

@abayer
Copy link
Contributor Author

abayer commented Oct 5, 2022

Yeah, https://kubernetes.io/blog/2021/12/09/pod-security-admission-beta/ makes me think we don't need to go to 1.23 to get things working, so that's good. =)

@abayer
Copy link
Contributor Author

abayer commented Oct 5, 2022

FYI - I'm going to repurpose this issue to be more generally about needing to do more work to move to PodSecurity.

@abayer abayer changed the title main (pre-v0.41.0) doesn't deploy on k8s 1.23+ Container configurations need to be updated for PodSecurity on k8s 1.23+ Oct 5, 2022
@dibyom dibyom removed the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Oct 18, 2022
@dibyom
Copy link
Member

dibyom commented Oct 18, 2022

(removing critical/urgent since we reverted the initial change)

@abayer
Copy link
Contributor Author

abayer commented Oct 18, 2022

For the record, I think it should still be critical-urgent since we need to support k8s 1.25, but hey, I seem to have found the fix - see #5652 (comment)

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.
Projects
Status: Done
3 participants