Skip to content

Commit 2b49643

Browse files
committed
update driver & launcher image handling
This change relies on manifest yamls to specify the launcher & driver that is pinned to a specific KFP version. The goal is to decouple having to build launcher/driver at separate stages compared to api server. This is accomplished by setting the hardcoded default to point to "latest" and during release, api server is built with this hardcoding, and the images for driver/launcher are patched into manifests post build along with the other images. The apiserver deployment manifest is reformatted using yq so the next time the release.sh is ran, the user is not surprised by the entire file reformatting unexpectedly. Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
1 parent a0e2406 commit 2b49643

File tree

3 files changed

+171
-156
lines changed

3 files changed

+171
-156
lines changed

backend/src/v2/compiler/argocompiler/container.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ import (
3030
const (
3131
volumeNameKFPLauncher = "kfp-launcher"
3232
volumeNameCABundle = "ca-bundle"
33-
DefaultLauncherImage = "ghcr.io/kubeflow/kfp-launcher:2.4.0"
33+
DefaultLauncherImage = "ghcr.io/kubeflow/kfp-launcher:latest"
3434
LauncherImageEnvVar = "V2_LAUNCHER_IMAGE"
35-
DefaultDriverImage = "ghcr.io/kubeflow/kfp-driver:2.4.0"
35+
DefaultDriverImage = "ghcr.io/kubeflow/kfp-driver:latest"
3636
DriverImageEnvVar = "V2_DRIVER_IMAGE"
3737
DefaultDriverCommand = "driver"
3838
DriverCommandEnvVar = "V2_DRIVER_COMMAND"

manifests/kustomize/base/pipeline/ml-pipeline-apiserver-deployment.yaml

Lines changed: 158 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -16,158 +16,162 @@ spec:
1616
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
1717
spec:
1818
containers:
19-
- env:
20-
- name: LOG_LEVEL
21-
value: "info"
22-
- name: AUTO_UPDATE_PIPELINE_DEFAULT_VERSION
23-
valueFrom:
24-
configMapKeyRef:
25-
name: pipeline-install-config
26-
key: autoUpdatePipelineDefaultVersion
27-
- name: POD_NAMESPACE
28-
valueFrom:
29-
fieldRef:
30-
fieldPath: metadata.namespace
31-
- name: OBJECTSTORECONFIG_SECURE
32-
value: "false"
33-
- name: OBJECTSTORECONFIG_BUCKETNAME
34-
valueFrom:
35-
configMapKeyRef:
36-
name: pipeline-install-config
37-
key: bucketName
38-
# relic variables
39-
- name: DBCONFIG_USER
40-
valueFrom:
41-
secretKeyRef:
42-
name: mysql-secret
43-
key: username
44-
- name: DBCONFIG_PASSWORD
45-
valueFrom:
46-
secretKeyRef:
47-
name: mysql-secret
48-
key: password
49-
- name: DBCONFIG_DBNAME
50-
valueFrom:
51-
configMapKeyRef:
52-
name: pipeline-install-config
53-
key: pipelineDb
54-
- name: DBCONFIG_HOST
55-
valueFrom:
56-
configMapKeyRef:
57-
name: pipeline-install-config
58-
key: dbHost
59-
- name: DBCONFIG_PORT
60-
valueFrom:
61-
configMapKeyRef:
62-
name: pipeline-install-config
63-
key: dbPort
64-
# end of relic variables
65-
- name: DBCONFIG_CONMAXLIFETIME
66-
valueFrom:
67-
configMapKeyRef:
68-
name: pipeline-install-config
69-
key: ConMaxLifeTime
70-
- name: DB_DRIVER_NAME
71-
valueFrom:
72-
configMapKeyRef:
73-
name: pipeline-install-config
74-
key: dbType
75-
# MySQL Config
76-
- name: DBCONFIG_MYSQLCONFIG_USER
77-
valueFrom:
78-
secretKeyRef:
79-
name: mysql-secret
80-
key: username
81-
- name: DBCONFIG_MYSQLCONFIG_PASSWORD
82-
valueFrom:
83-
secretKeyRef:
84-
name: mysql-secret
85-
key: password
86-
- name: DBCONFIG_MYSQLCONFIG_DBNAME
87-
valueFrom:
88-
configMapKeyRef:
89-
name: pipeline-install-config
90-
key: pipelineDb
91-
- name: DBCONFIG_MYSQLCONFIG_HOST
92-
valueFrom:
93-
configMapKeyRef:
94-
name: pipeline-install-config
95-
key: mysqlHost
96-
- name: DBCONFIG_MYSQLCONFIG_PORT
97-
valueFrom:
98-
configMapKeyRef:
99-
name: pipeline-install-config
100-
key: mysqlPort
101-
# end of MySQL Config
102-
- name: OBJECTSTORECONFIG_ACCESSKEY
103-
valueFrom:
104-
secretKeyRef:
105-
name: mlpipeline-minio-artifact
106-
key: accesskey
107-
- name: OBJECTSTORECONFIG_SECRETACCESSKEY
108-
valueFrom:
109-
secretKeyRef:
110-
name: mlpipeline-minio-artifact
111-
key: secretkey
112-
image: ghcr.io/kubeflow/kfp-api-server:dummy
113-
imagePullPolicy: IfNotPresent
114-
name: ml-pipeline-api-server
115-
ports:
116-
- name: http
117-
containerPort: 8888
118-
- name: grpc
119-
containerPort: 8887
120-
readinessProbe:
121-
exec:
122-
command:
123-
- wget
124-
- -q # quiet
125-
- -S # show server response
126-
- -O
127-
- "-" # Redirect output to stdout
128-
- http://localhost:8888/apis/v1beta1/healthz
129-
initialDelaySeconds: 3
130-
periodSeconds: 5
131-
timeoutSeconds: 2
132-
livenessProbe:
133-
exec:
134-
command:
135-
- wget
136-
- -q # quiet
137-
- -S # show server response
138-
- -O
139-
- "-" # Redirect output to stdout
140-
- http://localhost:8888/apis/v1beta1/healthz
141-
initialDelaySeconds: 3
142-
periodSeconds: 5
143-
timeoutSeconds: 2
144-
# This startup probe provides up to a 60 second grace window before the
145-
# liveness probe takes over to accomodate the occasional database
146-
# migration.
147-
startupProbe:
148-
exec:
149-
command:
150-
- wget
151-
- -q # quiet
152-
- -S # show server response
153-
- -O
154-
- "-" # Redirect output to stdout
155-
- http://localhost:8888/apis/v1beta1/healthz
156-
failureThreshold: 12
157-
periodSeconds: 5
158-
timeoutSeconds: 2
159-
securityContext:
160-
allowPrivilegeEscalation: false
161-
seccompProfile:
162-
type: RuntimeDefault
163-
runAsNonRoot: true
164-
runAsUser: 1000
165-
runAsGroup: 0
166-
capabilities:
167-
drop:
168-
- ALL
169-
resources:
170-
requests:
171-
cpu: 250m
172-
memory: 500Mi
19+
- env:
20+
- name: LOG_LEVEL
21+
value: "info"
22+
- name: AUTO_UPDATE_PIPELINE_DEFAULT_VERSION
23+
valueFrom:
24+
configMapKeyRef:
25+
name: pipeline-install-config
26+
key: autoUpdatePipelineDefaultVersion
27+
- name: POD_NAMESPACE
28+
valueFrom:
29+
fieldRef:
30+
fieldPath: metadata.namespace
31+
- name: OBJECTSTORECONFIG_SECURE
32+
value: "false"
33+
- name: OBJECTSTORECONFIG_BUCKETNAME
34+
valueFrom:
35+
configMapKeyRef:
36+
name: pipeline-install-config
37+
key: bucketName
38+
# relic variables
39+
- name: DBCONFIG_USER
40+
valueFrom:
41+
secretKeyRef:
42+
name: mysql-secret
43+
key: username
44+
- name: DBCONFIG_PASSWORD
45+
valueFrom:
46+
secretKeyRef:
47+
name: mysql-secret
48+
key: password
49+
- name: DBCONFIG_DBNAME
50+
valueFrom:
51+
configMapKeyRef:
52+
name: pipeline-install-config
53+
key: pipelineDb
54+
- name: DBCONFIG_HOST
55+
valueFrom:
56+
configMapKeyRef:
57+
name: pipeline-install-config
58+
key: dbHost
59+
- name: DBCONFIG_PORT
60+
valueFrom:
61+
configMapKeyRef:
62+
name: pipeline-install-config
63+
key: dbPort
64+
# end of relic variables
65+
- name: DBCONFIG_CONMAXLIFETIME
66+
valueFrom:
67+
configMapKeyRef:
68+
name: pipeline-install-config
69+
key: ConMaxLifeTime
70+
- name: DB_DRIVER_NAME
71+
valueFrom:
72+
configMapKeyRef:
73+
name: pipeline-install-config
74+
key: dbType
75+
# MySQL Config
76+
- name: DBCONFIG_MYSQLCONFIG_USER
77+
valueFrom:
78+
secretKeyRef:
79+
name: mysql-secret
80+
key: username
81+
- name: DBCONFIG_MYSQLCONFIG_PASSWORD
82+
valueFrom:
83+
secretKeyRef:
84+
name: mysql-secret
85+
key: password
86+
- name: DBCONFIG_MYSQLCONFIG_DBNAME
87+
valueFrom:
88+
configMapKeyRef:
89+
name: pipeline-install-config
90+
key: pipelineDb
91+
- name: DBCONFIG_MYSQLCONFIG_HOST
92+
valueFrom:
93+
configMapKeyRef:
94+
name: pipeline-install-config
95+
key: mysqlHost
96+
- name: DBCONFIG_MYSQLCONFIG_PORT
97+
valueFrom:
98+
configMapKeyRef:
99+
name: pipeline-install-config
100+
key: mysqlPort
101+
# end of MySQL Config
102+
- name: OBJECTSTORECONFIG_ACCESSKEY
103+
valueFrom:
104+
secretKeyRef:
105+
name: mlpipeline-minio-artifact
106+
key: accesskey
107+
- name: OBJECTSTORECONFIG_SECRETACCESSKEY
108+
valueFrom:
109+
secretKeyRef:
110+
name: mlpipeline-minio-artifact
111+
key: secretkey
112+
- name: V2_DRIVER_IMAGE
113+
value: ghcr.io/kubeflow/kfp-driver:2.4.0
114+
- name: V2_LAUNCHER_IMAGE
115+
value: ghcr.io/kubeflow/kfp-launcher:2.4.0
116+
image: ghcr.io/kubeflow/kfp-api-server:dummy
117+
imagePullPolicy: IfNotPresent
118+
name: ml-pipeline-api-server
119+
ports:
120+
- name: http
121+
containerPort: 8888
122+
- name: grpc
123+
containerPort: 8887
124+
readinessProbe:
125+
exec:
126+
command:
127+
- wget
128+
- -q # quiet
129+
- -S # show server response
130+
- -O
131+
- "-" # Redirect output to stdout
132+
- http://localhost:8888/apis/v1beta1/healthz
133+
initialDelaySeconds: 3
134+
periodSeconds: 5
135+
timeoutSeconds: 2
136+
livenessProbe:
137+
exec:
138+
command:
139+
- wget
140+
- -q # quiet
141+
- -S # show server response
142+
- -O
143+
- "-" # Redirect output to stdout
144+
- http://localhost:8888/apis/v1beta1/healthz
145+
initialDelaySeconds: 3
146+
periodSeconds: 5
147+
timeoutSeconds: 2
148+
# This startup probe provides up to a 60 second grace window before the
149+
# liveness probe takes over to accomodate the occasional database
150+
# migration.
151+
startupProbe:
152+
exec:
153+
command:
154+
- wget
155+
- -q # quiet
156+
- -S # show server response
157+
- -O
158+
- "-" # Redirect output to stdout
159+
- http://localhost:8888/apis/v1beta1/healthz
160+
failureThreshold: 12
161+
periodSeconds: 5
162+
timeoutSeconds: 2
163+
securityContext:
164+
allowPrivilegeEscalation: false
165+
seccompProfile:
166+
type: RuntimeDefault
167+
runAsNonRoot: true
168+
runAsUser: 1000
169+
runAsGroup: 0
170+
capabilities:
171+
drop:
172+
- ALL
173+
resources:
174+
requests:
175+
cpu: 250m
176+
memory: 500Mi
173177
serviceAccountName: ml-pipeline

manifests/kustomize/hack/release.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,14 @@ do
4040
done
4141

4242
yq w -i "${MANIFEST_DIR}/base/installs/generic/pipeline-install-config.yaml" data.appVersion "$TAG_NAME"
43+
44+
## Driver & Launcher images are added as environment variables
45+
API_SERVER_MANIFEST="${MANIFEST_DIR}/base/pipeline/ml-pipeline-apiserver-deployment.yaml"
46+
47+
yq w -i ${API_SERVER_MANIFEST} \
48+
"spec.template.spec.containers.(name==ml-pipeline-api-server).env.(name==V2_LAUNCHER_IMAGE).value" \
49+
"ghcr.io/kubeflow/kfp-launcher:${TAG_NAME}"
50+
51+
yq w -i ${API_SERVER_MANIFEST} \
52+
"spec.template.spec.containers.(name==ml-pipeline-api-server).env.(name==V2_DRIVER_IMAGE).value" \
53+
"ghcr.io/kubeflow/kfp-driver:${TAG_NAME}"

0 commit comments

Comments
 (0)