[ 
https://issues.apache.org/jira/browse/FLINK-36545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889781#comment-17889781
 ] 

Keith Wall edited comment on FLINK-36545 at 10/16/24 7:29 AM:
--------------------------------------------------------------

[~tedhtchang] I noticed the code comes from you.  I'm not understand why the 
--user argument makes sense.  That would imply the container image has the same 
users/groups configured as the host, wouldn't it? Could you confirm the intent?


was (Author: k-wall):
[~tedhtchang] I noticed the code comes from you. Could you confirm the intent?

> generate-olm-bundle.sh switches uid/gid when running the OLM tool image
> -----------------------------------------------------------------------
>
>                 Key: FLINK-36545
>                 URL: https://issues.apache.org/jira/browse/FLINK-36545
>             Project: Flink
>          Issue Type: Bug
>          Components: Kubernetes Operator
>            Reporter: Keith Wall
>            Priority: Major
>
> I noticed while investigating FLINK-36544 that the uid/gid values are 
> switched around.  uid gets assigned to the user's gid, and gid to the user's 
> uid. This doesn't seem to cause a functional problem for me, but this appears 
> to be wrong.
> [https://github.com/apache/flink-kubernetes-operator/blob/d72e3ce294e3902cf041811e0fcf2ba50880cc31/tools/olm/generate-olm-bundle.sh#L42]
> {{generate_olm_bundle() {}}
> {{  uid="$(id -g ${USER})"   # Should be -u}}
> {{  gid="$(id -u ${USER})"   # Should be -g}}
> {{  cp -r ../../helm ./}}
> {{{}  docker build -t "${OLMTOOL_IMG}" -f utils.Dockerfile $\{BASEDIR{}}}}
> {{  docker run --user="${uid}:${gid}" -v ${BASEDIR}:/olm  "${OLMTOOL_IMG}"}}
> {{  rm -rf helm}}
> {{}}}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to