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

Remove chmod operations from init Container #739

Merged
merged 2 commits into from
Jun 25, 2021
Merged

Conversation

coro
Copy link
Contributor

@coro coro commented Jun 24, 2021

This is no longer needed as fsGroup modifies this for us.

Note to reviewers: remember to look at the commits in this PR and consider if they can be squashed

Summary Of Changes

fsGroup, set in the securityContext of mounted volumes, already sets the ownership of files within the volumes, so explicitly setting them in the initContainer is unnecessary. We also no longer run as GID 999, so part of the chown operation is actively doing the wrong thing now.

Additional Context

This brings the operator closer to supporting Openshift's arbitrary user flow.

Following this PR will be updates to the docs around installing on Openshift.

Local Testing

Please ensure you run the unit, integration and system tests before approving the PR.

To run the unit and integration tests:

$ make unit-tests integration-tests

You will need to target a k8s cluster and have the operator deployed for running the system tests.

For example, for a Kubernetes context named dev-bunny:

$ kubectx dev-bunny
$ make destroy deploy-dev
# wait for operator to be deployed
$ make system-tests

This is no longer needed as fsGroup modifies this for us.
@coro coro added the open-shift Issues reported on OpenShift flavour of Kubernetes label Jun 24, 2021
Copy link
Contributor

@ChunyiLyu ChunyiLyu left a comment

Choose a reason for hiding this comment

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

Love it!

@coro coro merged commit 3512c6f into main Jun 25, 2021
@coro coro deleted the remove-chmod-initcon branch June 25, 2021 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-shift Issues reported on OpenShift flavour of Kubernetes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants