Skip to content

Commit 83c7224

Browse files
Merge pull request opendatahub-io#22 from rimolive/rmartine
Parametrize ML Pipelines
2 parents b10ae74 + f9dbc48 commit 83c7224

File tree

12 files changed

+89
-28
lines changed

12 files changed

+89
-28
lines changed

manifests/opendatahub/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ This directory contains artifacts for deploying all backend components of ML Pip
4646
4747
This directory contains the service monitor definition for ML Pipelines. It is always deployed by base, so this will eventually be moved into the base directory itself.
4848
49+
## Parameters
50+
51+
You can customize the ML Pipelines deployment by injecting custom parameters to change the default deployment. The following parameters can be used:
52+
53+
* **pipeline_install_configuration**: The ConfigMap name that contains the values to install the ML Pipelines environment. This parameter defaults to `pipeline-install-config` and you can find an example in the [repository](./base/configmaps/pipeline-install-config.yaml).
54+
* **ml_pipelines_configuration**: The ConfigMap name that contains the values to integrate ML Pipelines with the underlying components (Database and Object Store). This parameter defaults to `kfp-tekton-config` and you can find an example in the [repository](./base/configmaps/kfp-tekton-config.yaml).
55+
* **database_secret**: The secret that contains the credentials for the ML Pipelines Databse. It defaults to `mysql-secret` if using the `metadata-store-mysql` overlay or `postgresql-secret` if using the `metadata-store-postgresql` overlay.
56+
* **ml_pipelines_ui_configuration**: The ConfigMap that contains the values to customize UI. It defaults to `ml-pipeline-ui-configmap`.
57+
4958
## Configuration
5059
5160
* It is possible to configure what S3 storage is being used by Pipeline Runs. Detailed instructions on how to configure this will be added once Minio is moved to an overlay.

manifests/opendatahub/base/deployments/metadata-grpc-deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ spec:
3333
valueFrom:
3434
secretKeyRef:
3535
key: username
36-
name: mysql-secret
36+
name: $(database_secret)
3737
- name: DBCONFIG_PASSWORD
3838
valueFrom:
3939
secretKeyRef:
4040
key: password
41-
name: mysql-secret
41+
name: $(database_secret)
4242
- name: MYSQL_DATABASE
4343
valueFrom:
4444
configMapKeyRef:
4545
key: mlmdDb
46-
name: pipeline-install-config
46+
name: $(pipeline_install_configuration)
4747
- name: MYSQL_HOST
4848
valueFrom:
4949
configMapKeyRef:
5050
key: dbHost
51-
name: pipeline-install-config
51+
name: $(pipeline_install_configuration)
5252
- name: MYSQL_PORT
5353
valueFrom:
5454
configMapKeyRef:
5555
key: dbPort
56-
name: pipeline-install-config
56+
name: $(pipeline_install_configuration)
5757
image: metadata-grpc
5858
livenessProbe:
5959
initialDelaySeconds: 3

manifests/opendatahub/base/deployments/metadata-writer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
valueFrom:
3030
configMapKeyRef:
3131
key: archive_logs
32-
name: kfp-tekton-config
32+
name: $(ml_pipelines_configuration)
3333
image: metadata-writer
3434
name: main
3535
serviceAccountName: kubeflow-pipelines-metadata-writer

manifests/opendatahub/base/deployments/ml-pipeline-scheduledworkflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
valueFrom:
2929
configMapKeyRef:
3030
key: cronScheduleTimezone
31-
name: pipeline-install-config
31+
name: $(pipeline_install_configuration)
3232
image: scheduledworkflow
3333
imagePullPolicy: IfNotPresent
3434
name: ml-pipeline-scheduledworkflow

manifests/opendatahub/base/deployments/ml-pipeline.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,94 +31,94 @@ spec:
3131
valueFrom:
3232
secretKeyRef:
3333
key: username
34-
name: mysql-secret
34+
name: $(database_secret)
3535
- name: DBCONFIG_PASSWORD
3636
valueFrom:
3737
secretKeyRef:
3838
key: password
39-
name: mysql-secret
39+
name: $(database_secret)
4040
- name: DBCONFIG_DBNAME
4141
valueFrom:
4242
configMapKeyRef:
4343
key: pipelineDb
44-
name: pipeline-install-config
44+
name: $(pipeline_install_configuration)
4545
- name: DBCONFIG_HOST
4646
valueFrom:
4747
configMapKeyRef:
4848
key: dbHost
49-
name: pipeline-install-config
49+
name: $(pipeline_install_configuration)
5050
- name: DBCONFIG_PORT
5151
valueFrom:
5252
configMapKeyRef:
5353
key: dbPort
54-
name: pipeline-install-config
54+
name: $(pipeline_install_configuration)
5555
- name: PIPELINE_RUNTIME
5656
value: tekton
5757
- name: ARTIFACT_BUCKET
5858
valueFrom:
5959
configMapKeyRef:
6060
key: artifact_bucket
61-
name: kfp-tekton-config
61+
name: $(ml_pipelines_configuration)
6262
- name: ARTIFACT_ENDPOINT
6363
valueFrom:
6464
configMapKeyRef:
6565
key: artifact_endpoint
66-
name: kfp-tekton-config
66+
name: $(ml_pipelines_configuration)
6767
- name: ARTIFACT_ENDPOINT_SCHEME
6868
valueFrom:
6969
configMapKeyRef:
7070
key: artifact_endpoint_scheme
71-
name: kfp-tekton-config
71+
name: $(ml_pipelines_configuration)
7272
- name: ARCHIVE_LOGS
7373
valueFrom:
7474
configMapKeyRef:
7575
key: archive_logs
76-
name: kfp-tekton-config
76+
name: $(ml_pipelines_configuration)
7777
- name: TRACK_ARTIFACTS
7878
valueFrom:
7979
configMapKeyRef:
8080
key: track_artifacts
81-
name: kfp-tekton-config
81+
name: $(ml_pipelines_configuration)
8282
- name: STRIP_EOF
8383
valueFrom:
8484
configMapKeyRef:
8585
key: strip_eof
86-
name: kfp-tekton-config
86+
name: $(ml_pipelines_configuration)
8787
- name: ARTIFACT_SCRIPT
8888
valueFrom:
8989
configMapKeyRef:
9090
key: artifact_script
91-
name: kfp-tekton-config
91+
name: $(ml_pipelines_configuration)
9292
- name: ARTIFACT_IMAGE
9393
valueFrom:
9494
configMapKeyRef:
9595
key: artifact_image
96-
name: kfp-tekton-config
96+
name: $(ml_pipelines_configuration)
9797
- name: INJECT_DEFAULT_SCRIPT
9898
valueFrom:
9999
configMapKeyRef:
100100
key: inject_default_script
101-
name: kfp-tekton-config
101+
name: $(ml_pipelines_configuration)
102102
- name: APPLY_TEKTON_CUSTOM_RESOURCE
103103
valueFrom:
104104
configMapKeyRef:
105105
key: apply_tekton_custom_resource
106-
name: kfp-tekton-config
106+
name: $(ml_pipelines_configuration)
107107
- name: TERMINATE_STATUS
108108
valueFrom:
109109
configMapKeyRef:
110110
key: terminate_status
111-
name: kfp-tekton-config
111+
name: $(ml_pipelines_configuration)
112112
- name: AUTO_UPDATE_PIPELINE_DEFAULT_VERSION
113113
valueFrom:
114114
configMapKeyRef:
115115
key: autoUpdatePipelineDefaultVersion
116-
name: pipeline-install-config
116+
name: $(pipeline_install_configuration)
117117
- name: DBCONFIG_CONMAXLIFETIMESEC
118118
valueFrom:
119119
configMapKeyRef:
120120
key: ConMaxLifeTimeSec
121-
name: pipeline-install-config
121+
name: $(pipeline_install_configuration)
122122
image: api-server
123123
imagePullPolicy: Always
124124
livenessProbe:

manifests/opendatahub/base/kustomization.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,34 @@ vars:
7373
apiVersion: v1
7474
fieldref:
7575
fieldpath: data.artifact_secret_name
76+
- name: pipeline_install_configuration
77+
objref:
78+
name: kfp-tekton-params-config
79+
kind: ConfigMap
80+
apiVersion: v1
81+
fieldref:
82+
fieldpath: data.pipeline_install_configuration
83+
- name: ml_pipelines_configuration
84+
objref:
85+
name: kfp-tekton-params-config
86+
kind: ConfigMap
87+
apiVersion: v1
88+
fieldref:
89+
fieldpath: data.ml_pipelines_configuration
90+
- name: database_secret
91+
objref:
92+
name: kfp-tekton-params-config
93+
kind: ConfigMap
94+
apiVersion: v1
95+
fieldref:
96+
fieldpath: data.database_secret
97+
- name: ml_pipelines_ui_configuration
98+
objref:
99+
name: kfp-tekton-params-config
100+
kind: ConfigMap
101+
apiVersion: v1
102+
fieldref:
103+
fieldpath: data.ml_pipelines_ui_configuration
76104
configurations:
77105
- params.yaml
78106

manifests/opendatahub/base/params.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
artifact_secret_name=mlpipeline-minio-artifact
2+
pipeline_install_configuration=pipeline-install-config
3+
ml_pipelines_configuration=kfp-tekton-config
4+
database_secret=mysql-secret
5+
ml_pipelines_ui_configuration=ml-pipeline-ui-configmap

manifests/opendatahub/base/params.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ varReference:
44
kind: Deployment
55
- path: spec/template/spec/containers[]/envFrom/secretRef/name
66
kind: Deployment
7+
- path: spec/template/spec/containers[]/env[]/valueFrom/configMapKeyRef/name
8+
kind: Deployment
9+
- path: spec/template/spec/volumes[]/configMap/name
10+
kind: Deployment

manifests/opendatahub/overlays/metadata-store-mysql/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44

5+
bases:
6+
- ../../base
7+
58
resources:
69
# ServiceAccounts
710
- ./serviceaccounts/mysql.yaml

manifests/opendatahub/overlays/metadata-store-postgresql/deployments/postgresql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ spec:
2626
valueFrom:
2727
secretKeyRef:
2828
key: username
29-
name: postgresql-secret
29+
name: $(database_secret)
3030
- name: POSTGRESQL_PASSWORD
3131
valueFrom:
3232
secretKeyRef:
3333
key: password
34-
name: postgresql-secret
34+
name: $(database_secret)
3535
- name: POSTGRESQL_DATABASE
3636
value: kfp-tekton
3737
imagePullPolicy: Always

0 commit comments

Comments
 (0)