diff --git a/driver/rockcraft.yaml b/driver/rockcraft.yaml index 49623cb..934367a 100644 --- a/driver/rockcraft.yaml +++ b/driver/rockcraft.yaml @@ -1,8 +1,8 @@ -# Based on: https://github.com/kubeflow/pipelines/blob/2.2.0/backend/Dockerfile.driver +# Based on: https://github.com/kubeflow/pipelines/blob/2.4.0/backend/Dockerfile.driver name: kfp-driver summary: Kubeflow Pipelines Driver description: This image is used as part of the Charmed Kubeflow product -version: 2.2.0 +version: 2.4.0 license: Apache-2.0 base: ubuntu@22.04 run-user: _daemon_ @@ -14,7 +14,6 @@ services: override: merge summary: "kfp driver service" startup: enabled - user: appuser command: "/bin/driver" parts: @@ -31,13 +30,14 @@ parts: source-type: git source: https://github.com/kubeflow/pipelines.git source-depth: 1 - source-tag: 2.2.0 + source-tag: 2.4.0 build-snaps: - - go/1.21/stable + - go/1.22/stable build-packages: - apt - bash build-environment: + - GCFLAGS: "" - CGO_ENABLED: 0 - GOOS: linux - GOARCH: amd64 @@ -49,7 +49,7 @@ parts: mkdir -p $CRAFT_PART_INSTALL/bin mkdir -p $CRAFT_PART_INSTALL/third_party - go build -tags netgo -ldflags '-extldflags "-static"' -o $CRAFT_PART_INSTALL/bin/driver $CRAFT_PART_BUILD/backend/src/v2/cmd/driver/*.go + go build -tags netgo -gcflags="${GCFLAGS}" -ldflags '-extldflags "-static"' -o $CRAFT_PART_INSTALL/bin/driver $CRAFT_PART_BUILD/backend/src/v2/cmd/driver/*.go ./hack/install-go-licenses.sh @@ -57,16 +57,3 @@ parts: $GOBIN/go-licenses csv $CRAFT_PART_BUILD/backend/src/v2/cmd/driver > $CRAFT_PART_INSTALL/third_party/licenses.csv && \ diff $CRAFT_PART_INSTALL/third_party/licenses.csv $CRAFT_PART_BUILD/backend/third_party_licenses/driver.csv && \ $GOBIN/go-licenses save $CRAFT_PART_BUILD/backend/src/v2/cmd/driver --save_path $CRAFT_PART_INSTALL/third_party/NOTICES - - # not-root user for this rock should be 'appuser' - non-root-user: - plugin: nil - after: [ driver ] - overlay-script: | - # Create a user in the $CRAFT_OVERLAY chroot - groupadd -R $CRAFT_OVERLAY -g 1001 appuser - useradd -R $CRAFT_OVERLAY -M -r -u 1001 -g appuser appuser - override-prime: | - craftctl default - chown -R 584792:users bin -