Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-36545

generate-olm-bundle.sh switches uid/gid when running the OLM tool image

    XMLWordPrintableJSON

Details

    Description

      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
      }

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kwall Keith Wall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: