Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/kube-slack] To run kube-slack as non root #21967

Closed
wants to merge 6 commits into from
Closed

[stable/kube-slack] To run kube-slack as non root #21967

wants to merge 6 commits into from

Conversation

pierluigilenoci
Copy link
Contributor

What this PR does / why we need it:

To run kube-slack as non root

Which issue this PR fixes

No issue to fix, only an improvement

Special notes for your reviewer:

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pierluigilenoci
To complete the pull request process, please assign jstriebel
You can assign the PR to them by writing /assign @jstriebel in a comment when ready.

The full list of commands accepted by this bot can be found 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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 16, 2020
@helm-bot helm-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 16, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @pierluigilenoci. Thanks for your PR.

I'm waiting for a helm 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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 16, 2020
@helm-bot helm-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Apr 16, 2020
@pierluigilenoci pierluigilenoci marked this pull request as ready for review April 16, 2020 14:32
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 16, 2020
@helm-bot helm-bot removed the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Apr 16, 2020
Signed-off-by: Pierluigi Lenoci <[email protected]>
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). labels Apr 16, 2020
Signed-off-by: Pierluigi Lenoci <[email protected]>
@helm-bot helm-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Apr 16, 2020
@jstriebel
Copy link
Collaborator

@pierluigilenoci Thanks for your PR. Accoding to the current Dockerfile the container would already be running as non-root. Why exactly would the proposed change be necessary?

If you want to move forward with this PR please merge the newest changes from your previous commit also.

@pierluigilenoci
Copy link
Contributor Author

@jstriebel according to my knowledge if you use an "alphanumeric" user you get this error from K8s: "container has runAsNonRoot and image has non-numeric user (%s), cannot verify user is non-root". So we need to add a securityContext inside the deployment with a proper runAsUser parameter.
Another viable option, but more complex and, for me, it's not worth it, is to introduce a Pod Security Policy.

@helm-bot helm-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 17, 2020
@pierluigilenoci
Copy link
Contributor Author

Recreate the PR here #21983

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants