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

[stable/minio] Add support for securityContext runAsUser and runAsGroup #17393

Closed
wants to merge 5 commits into from

Conversation

simonwgill
Copy link

FAO @acaleph, @minio

What this PR does / why we need it:

When the podSecurityContext does not allow runAsRoot, there was no method to configure minio to function. This PR allows consumers to use minio in this situation.

Is this a new chart?

No

Which issue this PR fixes

Special notes for your reviewer:

The configPath and configPathmc variables have been changed to use a default that doesn't rely on the active user being root.

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/chart])

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: simonwgill
To complete the pull request process, please assign nitisht
You can assign the PR to them by writing /assign @nitisht 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

@helm-bot helm-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 24, 2019
@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 Sep 24, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @simonwgill. 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.

@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 Sep 24, 2019
@simonwgill
Copy link
Author

/assign @nitisht for approval

@k8s-ci-robot
Copy link
Contributor

@simonwgill: GitHub didn't allow me to assign the following users: for, approval.

Note that only helm members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @nitisht for approval

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.

@simonwgill
Copy link
Author

Should I be keeping track of the head branch, or should I wait for some level of approval of the branch as it was?

@nitisht
Copy link
Contributor

nitisht commented Oct 7, 2019

Please fix the conflicts @simonwgill

simonwgill and others added 3 commits October 7, 2019 09:14
Only added User and Group

Signed-off-by: Simon W. Gill <simon.gill@citizensadvice.org.uk>
Signed-off-by: Simon W. Gill <simon.gill@citizensadvice.org.uk>
Signed-off-by: Simon W. Gill <simon.gill@citizensadvice.org.uk>
@zanhsieh
Copy link
Collaborator

zanhsieh commented Oct 7, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 7, 2019
@nitisht
Copy link
Contributor

nitisht commented Oct 7, 2019

can you confirm if you have deployed this locally and it works @simonwgill

@simonwgill
Copy link
Author

@nitisht I had to go back and double check, but yes, it's happily running locally on my setup.

@nitisht
Copy link
Contributor

nitisht commented Oct 7, 2019

Thank you for checking again! :)

Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

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

Few recommendations..

stable/minio/README.md Outdated Show resolved Hide resolved
@@ -108,8 +108,8 @@ The following table lists the configurable parameters of the MinIO chart and the
| `existingSecret` | Name of existing secret with access and secret key. | `""` |
| `accessKey` | Default access key (5 to 20 characters) | `AKIAIOSFODNN7EXAMPLE` |
| `secretKey` | Default secret key (8 to 40 characters) | `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` |
| `configPath` | Default config file location | `~/.minio` |
| `configPathmc` | Default config file location for MinIO client - mc | `~/.mc` |
| `configPath` | Default config file location | `/etc/minio` |
Copy link
Contributor

Choose a reason for hiding this comment

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

--config-dir has been deprecated from MinIO server as of minio/minio#7033, can you please remove this option completely?

Copy link
Author

Choose a reason for hiding this comment

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

I've removed the option. Haven't implemented the certs-dir functionality at this point though.

Are you expecting --certs-dir to be implemented under this ticket? That seems out of scope for what I was updating and I'm not sure how to set up any tests to handle it. Doesn't look like anyone raised the deprecation as an issue either.

@@ -48,11 +48,18 @@ priorityClassName: ""
existingSecret: ""
accessKey: "AKIAIOSFODNN7EXAMPLE"
secretKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
configPath: "/root/.minio/"
configPathmc: "/root/.mc/"
configPath: "/etc/minio/"
Copy link
Contributor

Choose a reason for hiding this comment

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

--config-dir has been deprecated from MinIO server as of minio/minio#7033, can you please remove this option completely?

@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 Oct 7, 2019
Signed-off-by: Simon W. Gill <simon.gill@citizensadvice.org.uk>
…on by minio.

Signed-off-by: Simon W. Gill <simon.gill@citizensadvice.org.uk>

fix(stable/minio): Removed configDir references
@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 Oct 7, 2019
@simonwgill
Copy link
Author

Does the --cert-dir option need support adding in this PR? That seems out of scope for the original issue.

@dmccaffery
Copy link

Just ran into this myself -- what do we need to do to get the ball rolling @nitisht / @simonwgill ? -- looks like there are a couple of conflicts -- is anything else required?

@simonwgill
Copy link
Author

I wasn't sure if adding --cert-dir was in scope for this PR, and I've been waiting on an answer to that question from someone.

Haven't looked at what's been integrated since I last rebased though.

@stale
Copy link

stale bot commented Dec 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 4, 2019
@stale
Copy link

stale bot commented Dec 18, 2019

This issue is being automatically closed due to inactivity.

@stale stale bot closed this Dec 18, 2019
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). lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[stable/minio] securityContext is not supported [stable/minio] securityContext / runasuser
6 participants