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

fix: fix permissions on /milvus for OpenShift compatibility #30775

Merged

Conversation

guimou
Copy link
Contributor

@guimou guimou commented Feb 22, 2024

OpenShift runs Pods with a random uid and gid 0.
As Milvus needs to write into the /milvus directory, this fix modifies the group permissions to allow the root group (gid 0) to write into it.
This is a simple solution that allows to run Milvus on OpenShift without adding security constraints, use special ServiceAccounts or whatever. This should also not impact any other kubernetes platform as it's a simple group permission change, nothing regarding the userid.

Note: Other actions are necessary to properly deploy the full stack (Minio, Pulsar,...) on OpenShift. I will document them in the helm chart project.

Fixes #25565

@sre-ci-robot
Copy link
Contributor

Welcome @guimou! It looks like this is your first PR to milvus-io/milvus 🎉

@sre-ci-robot sre-ci-robot added the size/XS Denotes a PR that changes 0-9 lines. label Feb 22, 2024
@mergify mergify bot added the needs-dco DCO is missing in this pull request. label Feb 22, 2024
Copy link
Contributor

mergify bot commented Feb 22, 2024

@guimou Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.

@mergify mergify bot added the kind/bug Issues or changes related a bug label Feb 22, 2024
Signed-off-by: Guillaume Moutier <guillaume.moutier@gmail.com>
@haorenfsa
Copy link
Contributor

@LoveEachDay take a look?

Copy link
Contributor

@LoveEachDay LoveEachDay left a comment

Choose a reason for hiding this comment

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

/lgtm

@arunkumara8
Copy link

@guimou Thanks for fixing this issue. @LoveEachDay Can you let me know when the next release is scheduled and if this fix will be included? Thank you.

@haorenfsa
Copy link
Contributor

Hi @arunkumara8, we usually release minor version every 2 or 3 weeks. this fix will be included if its cherry-pick to v2.3 branch is merged.

@haorenfsa
Copy link
Contributor

rerun ut

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.72%. Comparing base (e5353ad) to head (da40d81).
Report is 39 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #30775      +/-   ##
==========================================
+ Coverage   80.48%   80.72%   +0.23%     
==========================================
  Files         964      964              
  Lines      137160   137161       +1     
==========================================
+ Hits       110400   110719     +319     
+ Misses      23036    22727     -309     
+ Partials     3724     3715       -9     

see 25 files with indirect coverage changes

@haorenfsa
Copy link
Contributor

/assign @czs007

@czs007
Copy link
Contributor

czs007 commented Feb 28, 2024

/approve

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, guimou, LoveEachDay

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

@czs007 czs007 added the manual-pass manually set pass before ci-passed labeled label Feb 28, 2024
@sre-ci-robot sre-ci-robot merged commit d15db75 into milvus-io:master Feb 28, 2024
13 of 14 checks passed
haorenfsa pushed a commit to haorenfsa/milvus that referenced this pull request Feb 29, 2024
…o#30775)

OpenShift runs Pods with a random uid and gid 0.
As Milvus needs to write into the /milvus directory, this fix modifies
the group permissions to allow the root group (gid 0) to write into it.
This is a simple solution that allows to run Milvus on OpenShift without
adding security constraints, use special ServiceAccounts or whatever.
This should also not impact any other kubernetes platform as it's a
simple group permission change, nothing regarding the userid.

Note: Other actions are necessary to properly deploy the full stack
(Minio, Pulsar,...) on OpenShift. I will document them in the helm chart
project.

Fixes milvus-io#25565

Signed-off-by: Guillaume Moutier <guillaume.moutier@gmail.com>
haorenfsa pushed a commit to haorenfsa/milvus that referenced this pull request Feb 29, 2024
…o#30775)

OpenShift runs Pods with a random uid and gid 0.
As Milvus needs to write into the /milvus directory, this fix modifies
the group permissions to allow the root group (gid 0) to write into it.
This is a simple solution that allows to run Milvus on OpenShift without
adding security constraints, use special ServiceAccounts or whatever.
This should also not impact any other kubernetes platform as it's a
simple group permission change, nothing regarding the userid.

Note: Other actions are necessary to properly deploy the full stack
(Minio, Pulsar,...) on OpenShift. I will document them in the helm chart
project.

Fixes milvus-io#25565

Signed-off-by: Guillaume Moutier <guillaume.moutier@gmail.com>
haorenfsa pushed a commit to haorenfsa/milvus that referenced this pull request Mar 4, 2024
…o#30775)

OpenShift runs Pods with a random uid and gid 0.
As Milvus needs to write into the /milvus directory, this fix modifies
the group permissions to allow the root group (gid 0) to write into it.
This is a simple solution that allows to run Milvus on OpenShift without
adding security constraints, use special ServiceAccounts or whatever.
This should also not impact any other kubernetes platform as it's a
simple group permission change, nothing regarding the userid.

Note: Other actions are necessary to properly deploy the full stack
(Minio, Pulsar,...) on OpenShift. I will document them in the helm chart
project.

Fixes milvus-io#25565

Signed-off-by: Guillaume Moutier <guillaume.moutier@gmail.com>
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
haorenfsa pushed a commit to haorenfsa/milvus that referenced this pull request Mar 4, 2024
…o#30775)

OpenShift runs Pods with a random uid and gid 0.
As Milvus needs to write into the /milvus directory, this fix modifies
the group permissions to allow the root group (gid 0) to write into it.
This is a simple solution that allows to run Milvus on OpenShift without
adding security constraints, use special ServiceAccounts or whatever.
This should also not impact any other kubernetes platform as it's a
simple group permission change, nothing regarding the userid.

Note: Other actions are necessary to properly deploy the full stack
(Minio, Pulsar,...) on OpenShift. I will document them in the helm chart
project.

Fixes milvus-io#25565

Signed-off-by: Guillaume Moutier <guillaume.moutier@gmail.com>
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request Mar 4, 2024
Fixes #25565
Cherry-pick 
pr: #30775

Signed-off-by: Guillaume Moutier <guillaume.moutier@gmail.com>
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
Co-authored-by: Guillaume Moutier <guimou@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/bug Issues or changes related a bug lgtm manual-pass manually set pass before ci-passed labeled size/XS Denotes a PR that changes 0-9 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Enable milvus containers to run as a non-root user
6 participants