Skip to content

Commit

Permalink
fix: fix permissions on /milvus for OpenShift compatibility (milvus-i…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
guimou authored and haorenfsa committed Feb 29, 2024
1 parent 0fa1475 commit 5595927
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/docker/milvus/amazonlinux2023/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ COPY ./configs/ /milvus/configs/

COPY ./lib/ /milvus/lib/

RUN chgrp -R root /milvus && \
chmod -R g+rwx /milvus

ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
Expand Down
3 changes: 3 additions & 0 deletions build/docker/milvus/gpu/ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ COPY ./configs/ /milvus/configs/

COPY ./lib/ /milvus/lib/

RUN chgrp -R root /milvus && \
chmod -R g+rwx /milvus

ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
Expand Down
3 changes: 3 additions & 0 deletions build/docker/milvus/ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ COPY ./configs/ /milvus/configs/

COPY ./lib/ /milvus/lib/

RUN chgrp -R root /milvus && \
chmod -R g+rwx /milvus

ENV PATH=/milvus/bin:$PATH
ENV LD_LIBRARY_PATH=/milvus/lib:$LD_LIBRARY_PATH:/usr/lib
ENV LD_PRELOAD=/milvus/lib/libjemalloc.so
Expand Down

0 comments on commit 5595927

Please sign in to comment.