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 CAP_SYS_CHROOT to DS/PSP when needed #8587

Merged
merged 1 commit into from
May 16, 2022

Conversation

mac-chaffee
Copy link
Contributor

What this PR does / why we need it:

When using chroot mode (--set controller.image.chroot=true) alongside podsecuritypolicies and a daemonset (--set podSecurityPolicy.enabled=true --set controller.kind=DaemonSet), it doesn't work since the DS/PSP are missing the SYS_CHROOT capability. This PR fixes that.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

Fixes #8517

How Has This Been Tested?

helm template ./ingress-nginx --set podSecurityPolicy.enabled=true --set controller.image.chroot=true --set controller.kind=DaemonSet | grep -A 55 DaemonSet

helm template ./ingress-nginx --set podSecurityPolicy.enabled=true --set controller.image.chroot=true --set controller.kind=DaemonSet | grep -A 25 PodSecurityPolicy

Checklist:

  • [n/a] My change requires a change to the documentation.
  • [n/a] I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • [n/a] I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 14, 2022
@k8s-ci-robot
Copy link
Contributor

@mac-chaffee: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

Hi @mac-chaffee. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/helm Issues or PRs related to helm charts labels May 14, 2022
@longwuyuan
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 15, 2022
@rikatz
Copy link
Contributor

rikatz commented May 16, 2022

/lgtm
/approve
Good catch! :D Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mac-chaffee, rikatz

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 16, 2022
@k8s-ci-robot k8s-ci-robot merged commit 6c3a237 into kubernetes:main May 16, 2022
@viq
Copy link
Contributor

viq commented May 16, 2022

Any idea when a new helm release with this in will be available?

@mac-chaffee
Copy link
Contributor Author

Guess I was supposed to bump the chart version: https://github.com/kubernetes/ingress-nginx/runs/6453045684?check_suite_focus=true

@cpanato
Copy link
Member

cpanato commented May 17, 2022

that is correct, the chart was not bumped in this pr, so need a chart bump and update the changelog
are you willing to open a pr to get this fixed?

viq added a commit to viq/ingress-nginx that referenced this pull request May 19, 2022
@viq viq mentioned this pull request May 19, 2022
8 tasks
@mac-chaffee mac-chaffee mentioned this pull request May 19, 2022
7 tasks
rchshld pushed a commit to joomcode/ingress-nginx that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/helm Issues or PRs related to helm charts cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Daemonset missing SYS_CHROOT permission when controller.image.chroot=true
6 participants