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

feat: update kfp driver to version 2.4.0 #175

Merged
merged 3 commits into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions driver/rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
run-user: _daemon_
Expand All @@ -14,7 +14,6 @@ services:
override: merge
summary: "kfp driver service"
startup: enabled
user: appuser
command: "/bin/driver"

parts:
Expand All @@ -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
Expand All @@ -49,24 +49,11 @@ 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

$GOBIN/go-licenses check $CRAFT_PART_BUILD/backend/src/v2/cmd/driver
$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

Loading