Skip to content

Commit 54f3fae

Browse files
committed
modified labels and env
Signed-off-by: kunal-511 <[email protected]>
1 parent 07e2320 commit 54f3fae

File tree

11 files changed

+183
-99
lines changed

11 files changed

+183
-99
lines changed

experimental/helm/charts/pipeline/ci/values-multi-user-enhanced.yaml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,8 @@ apiServer:
100100

101101
resources:
102102
requests:
103-
cpu: 500m
104-
memory: 1Gi
105-
limits:
106-
cpu: 2
107-
memory: 4Gi
103+
cpu: 250m
104+
memory: 500Mi
108105

109106
# Multi-user UI configuration
110107
ui:
@@ -132,13 +129,6 @@ scheduledWorkflow:
132129
- name: LOG_LEVEL
133130
value: "info"
134131
valueFrom: null
135-
resources:
136-
requests:
137-
cpu: 250m
138-
memory: 500Mi
139-
limits:
140-
cpu: 500m
141-
memory: 1Gi
142132

143133
metadata:
144134
grpc:
@@ -171,22 +161,26 @@ cache:
171161
memory: 2Gi
172162
additionalEnv:
173163
- name: NAMESPACE_TO_WATCH
164+
key: null
174165
- name: DEFAULT_CACHE_STALENESS
175166
key: DEFAULT_CACHE_STALENESS
176167
- name: MAXIMUM_CACHE_STALENESS
177168
key: MAXIMUM_CACHE_STALENESS
178169
- name: CACHE_IMAGE
179170
key: cacheImage
180171
- name: CACHE_NODE_RESTRICTIONS
172+
key: cacheNodeRestrictions
181173
- name: DBCONFIG_DRIVER
182174
- name: DBCONFIG_DB_NAME
183175
key: cacheDb
184176
- name: DBCONFIG_HOST_NAME
185177
key: dbHost
186178
- name: DBCONFIG_PORT
179+
key: dbPort
187180
- name: DBCONFIG_USER
188181
key: username
189182
- name: DBCONFIG_PASSWORD
183+
key: password
190184

191185
cacheDeployer:
192186
# Typically disabled in multi-user mode
@@ -201,13 +195,6 @@ visualization:
201195
viewerCrd:
202196
env:
203197
maxNumViewers: ""
204-
resources:
205-
requests:
206-
cpu: 250m
207-
memory: 500Mi
208-
limits:
209-
cpu: 500m
210-
memory: 1Gi
211198
additionalEnv:
212199
- name: NAMESPACE
213200
value: ""

experimental/helm/charts/pipeline/ci/values-platform-agnostic-enhanced.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ cache:
154154
memory: 1Gi
155155
additionalEnv:
156156
- name: DEFAULT_CACHE_STALENESS
157+
key: DEFAULT_CACHE_STALENESS
157158
- name: MAXIMUM_CACHE_STALENESS
158159
key: MAXIMUM_CACHE_STALENESS
159160
- name: CACHE_IMAGE
@@ -162,11 +163,13 @@ cache:
162163
key: cacheNodeRestrictions
163164
- name: DBCONFIG_DRIVER
164165
- name: DBCONFIG_DB_NAME
166+
key: cacheDb
165167
- name: DBCONFIG_HOST_NAME
166168
key: dbHost
167169
- name: DBCONFIG_PORT
168170
key: dbPort
169171
- name: DBCONFIG_USER
172+
key: username
170173
- name: DBCONFIG_PASSWORD
171174
key: password
172175
- name: NAMESPACE_TO_WATCH
@@ -186,7 +189,9 @@ viewerCrd:
186189
- name: MAX_NUM_VIEWERS
187190
value: 50
188191
- name: NAMESPACE
189-
value: ""
192+
valueFrom:
193+
fieldRef:
194+
fieldPath: metadata.namespace
190195

191196
# Monitoring disabled for platform-agnostic
192197
monitoring:

experimental/helm/charts/pipeline/templates/_helpers.tpl

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ Common labels
3636
{{- define "kubeflow-pipelines.labels" -}}
3737
app.kubernetes.io/component: ml-pipeline
3838
app.kubernetes.io/name: kubeflow-pipelines
39+
{{- if ne .Values.installMode.type "multi-user" }}
3940
application-crd-id: kubeflow-pipelines
41+
{{- end }}
4042
{{- with .Values.commonLabels }}
4143
{{ toYaml . }}
4244
{{- end }}
@@ -57,7 +59,9 @@ Cache server labels
5759
app: cache-server
5860
app.kubernetes.io/component: ml-pipeline
5961
app.kubernetes.io/name: kubeflow-pipelines
62+
{{- if ne .Values.installMode.type "multi-user" }}
6063
application-crd-id: kubeflow-pipelines
64+
{{- end }}
6165
{{- with .Values.commonLabels }}
6266
{{ toYaml . }}
6367
{{- end }}
@@ -83,7 +87,9 @@ ML Pipeline specific labels - matching original manifests
8387
app: ml-pipeline
8488
app.kubernetes.io/component: ml-pipeline
8589
app.kubernetes.io/name: kubeflow-pipelines
90+
{{- if ne .Values.installMode.type "multi-user" }}
8691
application-crd-id: kubeflow-pipelines
92+
{{- end }}
8793
{{- with .Values.commonLabels }}
8894
{{ toYaml . }}
8995
{{- end }}
@@ -107,16 +113,26 @@ ML Pipeline selector labels
107113
*/}}
108114
{{- define "kubeflow-pipelines.mlPipelineSelectorLabels" -}}
109115
app: ml-pipeline
116+
{{- if eq .Values.installMode.type "multi-user" }}
117+
app.kubernetes.io/component: ml-pipeline
118+
app.kubernetes.io/name: kubeflow-pipelines
119+
{{- else }}
110120
application-crd-id: kubeflow-pipelines
111121
{{- end }}
122+
{{- end }}
112123

113124
{{/*
114125
Cache server selector labels
115126
*/}}
116127
{{- define "kubeflow-pipelines.cacheSelectorLabels" -}}
117128
app: cache-server
129+
{{- if eq .Values.installMode.type "multi-user" }}
130+
app.kubernetes.io/component: ml-pipeline
131+
app.kubernetes.io/name: kubeflow-pipelines
132+
{{- else }}
118133
application-crd-id: kubeflow-pipelines
119134
{{- end }}
135+
{{- end }}
120136

121137
{{/*
122138
UI selector labels
@@ -126,13 +142,33 @@ app: ml-pipeline-ui
126142
application-crd-id: kubeflow-pipelines
127143
{{- end }}
128144

145+
{{/*
146+
Viewer CRD labels
147+
*/}}
148+
{{- define "kubeflow-pipelines.viewerCrdLabels" -}}
149+
{{- if eq .Values.installMode.type "multi-user" }}
150+
app.kubernetes.io/component: ml-pipeline
151+
app.kubernetes.io/name: kubeflow-pipelines
152+
app: ml-pipeline-viewer-crd
153+
{{- else }}
154+
{{- include "kubeflow-pipelines.labels" . }}
155+
app: ml-pipeline-viewer-crd
156+
{{- end }}
157+
{{- end }}
158+
129159
{{/*
130160
Viewer CRD selector labels
131161
*/}}
132162
{{- define "kubeflow-pipelines.viewerCrdSelectorLabels" -}}
163+
{{- if eq .Values.installMode.type "multi-user" }}
164+
app: ml-pipeline-viewer-crd
165+
app.kubernetes.io/component: ml-pipeline
166+
app.kubernetes.io/name: kubeflow-pipelines
167+
{{- else }}
133168
app: ml-pipeline-viewer-crd
134169
application-crd-id: kubeflow-pipelines
135170
{{- end }}
171+
{{- end }}
136172

137173
{{/*
138174
Visualization server labels
@@ -151,9 +187,15 @@ application-crd-id: kubeflow-pipelines
151187
Visualization server selector labels
152188
*/}}
153189
{{- define "kubeflow-pipelines.visualizationSelectorLabels" -}}
190+
{{- if eq .Values.installMode.type "multi-user" }}
191+
app: ml-pipeline-visualizationserver
192+
app.kubernetes.io/component: ml-pipeline
193+
app.kubernetes.io/name: kubeflow-pipelines
194+
{{- else }}
154195
app: ml-pipeline-visualizationserver
155196
application-crd-id: kubeflow-pipelines
156197
{{- end }}
198+
{{- end }}
157199

158200
{{/*
159201
MySQL selector labels
@@ -200,24 +242,39 @@ Metadata writer selector labels
200242
*/}}
201243
{{- define "kubeflow-pipelines.metadataWriterSelectorLabels" -}}
202244
app: metadata-writer
245+
{{- if eq .Values.installMode.type "multi-user" }}
246+
app.kubernetes.io/component: ml-pipeline
247+
app.kubernetes.io/name: kubeflow-pipelines
248+
{{- else }}
203249
application-crd-id: kubeflow-pipelines
204250
{{- end }}
251+
{{- end }}
205252

206253
{{/*
207254
Persistence agent selector labels
208255
*/}}
209256
{{- define "kubeflow-pipelines.persistenceAgentSelectorLabels" -}}
210257
app: ml-pipeline-persistenceagent
258+
{{- if eq .Values.installMode.type "multi-user" }}
259+
app.kubernetes.io/component: ml-pipeline
260+
app.kubernetes.io/name: kubeflow-pipelines
261+
{{- else }}
211262
application-crd-id: kubeflow-pipelines
212263
{{- end }}
264+
{{- end }}
213265

214266
{{/*
215267
Scheduled workflow selector labels
216268
*/}}
217269
{{- define "kubeflow-pipelines.scheduledWorkflowSelectorLabels" -}}
218270
app: ml-pipeline-scheduledworkflow
271+
{{- if eq .Values.installMode.type "multi-user" }}
272+
app.kubernetes.io/component: ml-pipeline
273+
app.kubernetes.io/name: kubeflow-pipelines
274+
{{- else }}
219275
application-crd-id: kubeflow-pipelines
220276
{{- end }}
277+
{{- end }}
221278

222279
{{/*
223280
Workflow controller selector labels

experimental/helm/charts/pipeline/templates/api-server/deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ spec:
2929
containerPort: 8887
3030
env:
3131
# API Server specific environment variables
32+
{{- if eq .Values.installMode.type "multi-user" }}
33+
- name: KUBEFLOW_USERID_HEADER
34+
value: "kubeflow-userid"
35+
- name: KUBEFLOW_USERID_PREFIX
36+
value: ""
37+
{{- end }}
3238
- name: PUBLISH_LOGS
3339
value: {{ .Values.apiServer.env.publishLogs | quote }}
3440
- name: LOG_LEVEL
@@ -125,6 +131,11 @@ spec:
125131
value: {{ .Values.apiServer.env.v2DriverImage | quote }}
126132
- name: V2_LAUNCHER_IMAGE
127133
value: {{ .Values.apiServer.env.v2LauncherImage | quote }}
134+
{{- if eq .Values.installMode.type "multi-user" }}
135+
envFrom:
136+
- configMapRef:
137+
name: pipeline-api-server-config
138+
{{- end }}
128139
livenessProbe:
129140
exec:
130141
command:

experimental/helm/charts/pipeline/templates/cache/deployment.yaml

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -34,57 +34,36 @@ spec:
3434
- "--namespace_to_watch=$(NAMESPACE_TO_WATCH)"
3535
- "--listen_port=$(WEBHOOK_PORT)"
3636
env:
37-
- name: DEFAULT_CACHE_STALENESS
38-
valueFrom:
39-
configMapKeyRef:
40-
name: pipeline-install-config
41-
key: DEFAULT_CACHE_STALENESS
42-
- name: MAXIMUM_CACHE_STALENESS
43-
valueFrom:
44-
configMapKeyRef:
45-
name: pipeline-install-config
46-
key: MAXIMUM_CACHE_STALENESS
47-
- name: CACHE_IMAGE
48-
valueFrom:
49-
configMapKeyRef:
50-
name: pipeline-install-config
51-
key: cacheImage
52-
- name: CACHE_NODE_RESTRICTIONS
53-
valueFrom:
54-
configMapKeyRef:
55-
name: pipeline-install-config
56-
key: cacheNodeRestrictions
57-
- name: DBCONFIG_DRIVER
58-
value: mysql
59-
- name: DBCONFIG_DB_NAME
60-
valueFrom:
61-
configMapKeyRef:
62-
name: pipeline-install-config
63-
key: cacheDb
64-
- name: DBCONFIG_HOST_NAME
65-
valueFrom:
66-
configMapKeyRef:
67-
name: pipeline-install-config
68-
key: dbHost
69-
- name: DBCONFIG_PORT
70-
valueFrom:
71-
configMapKeyRef:
72-
name: pipeline-install-config
73-
key: dbPort
74-
- name: DBCONFIG_USER
37+
{{- range .Values.cache.server.additionalEnv }}
38+
- name: {{ .name }}
39+
{{- if .value }}
40+
value: {{ .value | quote }}
41+
{{- else if and .key (ne .key "null") }}
42+
{{- if or (eq .name "DBCONFIG_USER") (eq .name "DBCONFIG_PASSWORD") }}
7543
valueFrom:
7644
secretKeyRef:
7745
name: mysql-secret
78-
key: username
79-
- name: DBCONFIG_PASSWORD
46+
key: {{ .key }}
47+
{{- else }}
8048
valueFrom:
81-
secretKeyRef:
82-
name: mysql-secret
83-
key: password
84-
- name: NAMESPACE_TO_WATCH
49+
configMapKeyRef:
50+
name: pipeline-install-config
51+
key: {{ .key }}
52+
{{- end }}
53+
{{- else if eq .name "NAMESPACE_TO_WATCH" }}
54+
{{- if eq $.Values.installMode.type "multi-user" }}
55+
value: ""
56+
{{- else }}
8557
valueFrom:
8658
fieldRef:
8759
fieldPath: metadata.namespace
60+
{{- end }}
61+
{{- else if eq .name "DBCONFIG_DRIVER" }}
62+
value: mysql
63+
{{- else }}
64+
value: ""
65+
{{- end }}
66+
{{- end }}
8867
- name: WEBHOOK_PORT
8968
value: "8443"
9069
ports:

experimental/helm/charts/pipeline/templates/cache/rolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.cache.enabled }}
1+
{{- if and .Values.cache.enabled (ne .Values.installMode.type "multi-user") }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: RoleBinding
44
metadata:

0 commit comments

Comments
 (0)