Skip to content

Commit

Permalink
chore(manifests): refactor manifests for kustomize5 compatibility. Pa…
Browse files Browse the repository at this point in the history
…rt of #10053 (#10087)

* refactor ml-pipeline component for kustomize5 compatibility

Signed-off-by: Alin Spinu <[email protected]>

* rm bk folder

Signed-off-by: Alin Spinu <[email protected]>

* fix kustomizations using auto kustomize edit

Signed-off-by: Alin Spinu <[email protected]>

* fix env/aws

Signed-off-by: Alin Spinu <[email protected]>

* fix kustomize version v5.0.3 in tests

Signed-off-by: Alin Spinu <[email protected]>

* minor changes to manifest apply method in pipeline deployment script

Signed-off-by: Alin Spinu <[email protected]>

* fix

Signed-off-by: Alin Spinu <[email protected]>

* fix kustomize release

Signed-off-by: Alin Spinu <[email protected]>

* fix archive

Signed-off-by: Alin Spinu <[email protected]>

* fix bin

Signed-off-by: Alin Spinu <[email protected]>

* replace patchStrategicMerge refs in test manifests

Signed-off-by: Alin Spinu <[email protected]>

* replace kustomize version with 5.2.1

Signed-off-by: Alin Spinu <[email protected]>

* replace all kustomize versions with 5.2.1

Signed-off-by: Alin Spinu <[email protected]>

---------

Signed-off-by: Alin Spinu <[email protected]>
  • Loading branch information
rawc0der authored Apr 4, 2024
1 parent a78dc77 commit af08576
Show file tree
Hide file tree
Showing 51 changed files with 283 additions and 287 deletions.
83 changes: 41 additions & 42 deletions manifests/kustomize/base/installs/generic/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
bases:
- ../../pipeline
- ../../cache
- ../../cache-deployer
resources:
- pipeline-install-config.yaml
- mysql-secret.yaml
- ../../pipeline
- ../../cache
- ../../cache-deployer
- pipeline-install-config.yaml
- mysql-secret.yaml
vars:
- name: kfp-namespace
objref:
kind: Deployment
apiVersion: apps/v1
name: ml-pipeline
fieldref:
fieldpath: metadata.namespace
- name: kfp-app-name
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.appName
- name: kfp-app-version
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.appVersion
- name: kfp-artifact-bucket-name
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.bucketName
- name: kfp-default-pipeline-root
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.defaultPipelineRoot
- name: kfp-namespace
objref:
kind: Deployment
apiVersion: apps/v1
name: ml-pipeline
fieldref:
fieldpath: metadata.namespace
- name: kfp-app-name
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.appName
- name: kfp-app-version
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.appVersion
- name: kfp-artifact-bucket-name
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.bucketName
- name: kfp-default-pipeline-root
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.defaultPipelineRoot
configurations:
- params.yaml
- params.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
bases:
resources:
- ../../../postgresql/pipeline
- ../../../postgresql/cache
- ../../../cache-deployer
resources:
- pipeline-install-config.yaml
- postgres-secret-extended.yaml
vars:
Expand Down
18 changes: 9 additions & 9 deletions manifests/kustomize/base/installs/multi-user/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ resources:
- metadata-writer
- istio-authorization-config.yaml
- virtual-service.yaml
patchesStrategicMerge:
- api-service/deployment-patch.yaml
- pipelines-ui/deployment-patch.yaml
- pipelines-ui/configmap-patch.yaml
- scheduled-workflow/deployment-patch.yaml
- viewer-controller/deployment-patch.yaml
- persistence-agent/deployment-patch.yaml
- metadata-writer/deployment-patch.yaml
- cache/deployment-patch.yaml
patches:
- path: api-service/deployment-patch.yaml
- path: pipelines-ui/deployment-patch.yaml
- path: pipelines-ui/configmap-patch.yaml
- path: scheduled-workflow/deployment-patch.yaml
- path: viewer-controller/deployment-patch.yaml
- path: persistence-agent/deployment-patch.yaml
- path: metadata-writer/deployment-patch.yaml
- path: cache/deployment-patch.yaml

configurations:
- params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow

bases:
- ../../base
resources:
- ../../base
- metadata-db-pvc.yaml
- metadata-db-deployment.yaml
- metadata-db-service.yaml

patchesStrategicMerge:
- patches/metadata-grpc-deployment.yaml
patches:
- path: patches/metadata-grpc-deployment.yaml

configMapGenerator:
- name: metadata-db-parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow

bases:
- ../../base
resources:
- ../../base
- metadata-db-pvc.yaml
- metadata-db-deployment.yaml
- metadata-db-service.yaml

patchesStrategicMerge:
- patches/metadata-grpc-deployment.yaml
patches:
- path: patches/metadata-grpc-deployment.yaml

configMapGenerator:
- name: metadata-postgres-db-parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ConfigMap
metadata:
name: kfp-launcher
data:
defaultPipelineRoot: $(kfp-default-pipeline-root)
defaultPipelineRoot: $(kfp-default-pipeline-root)
4 changes: 2 additions & 2 deletions manifests/kustomize/base/pipeline/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- metadata-writer

resources:
- metadata-writer
- ml-pipeline-apiserver-deployment.yaml
- ml-pipeline-apiserver-role.yaml
- ml-pipeline-apiserver-rolebinding.yaml
Expand Down
6 changes: 3 additions & 3 deletions manifests/kustomize/base/postgresql/cache/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
resources:
- ../../cache
patchesStrategicMerge:
- cache-deployment-patch.yaml
patches:
- path: cache-deployment-patch.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
resources:
- ../../pipeline
patchesStrategicMerge:
- ml-pipeline-apiserver-deployment-patch.yaml
patches:
- path: ml-pipeline-apiserver-deployment-patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace: kubeflow

resources:
- namespace.yaml
bases:
- ../third-party/application/cluster-scoped
- ../third-party/argo/installs/namespace/cluster-scoped
- ../base/pipeline/cluster-scoped
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-ui
spec:
template:
metadata:
labels:
app: ml-pipeline-ui
spec:
volumes:
- name: config-volume
configMap:
name: ml-pipeline-ui-configmap
containers:
- name: ml-pipeline-ui
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: mlpipeline-minio-artifact
key: accesskey
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: mlpipeline-minio-artifact
key: secretkey

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline
spec:
Expand Down Expand Up @@ -58,4 +29,4 @@ spec:
key: minioServiceRegion
- name: OBJECTSTORECONFIG_PORT
value: ""
name: ml-pipeline-api-server
name: ml-pipeline-api-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-ui
spec:
template:
metadata:
labels:
app: ml-pipeline-ui
spec:
volumes:
- name: config-volume
configMap:
name: ml-pipeline-ui-configmap
containers:
- name: ml-pipeline-ui
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: mlpipeline-minio-artifact
key: accesskey
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: mlpipeline-minio-artifact
key: secretkey
43 changes: 22 additions & 21 deletions manifests/kustomize/env/aws/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
bases:
- ../../env/platform-agnostic
resources:
- ../../env/platform-agnostic
configMapGenerator:
- name: pipeline-install-config
env: params.env
behavior: merge
- name: workflow-controller-configmap
behavior: replace
files:
- config
- name: ml-pipeline-ui-configmap
behavior: replace
files:
- viewer-pod-template.json
- name: pipeline-install-config
env: params.env
behavior: merge
- name: workflow-controller-configmap
behavior: replace
files:
- config
- name: ml-pipeline-ui-configmap
behavior: replace
files:
- viewer-pod-template.json
secretGenerator:
- name: mysql-secret
env: secret.env
behavior: merge
- name: mlpipeline-minio-artifact
env: minio-artifact-secret-patch.env
behavior: merge
- name: mysql-secret
env: secret.env
behavior: merge
- name: mlpipeline-minio-artifact
env: minio-artifact-secret-patch.env
behavior: merge
generatorOptions:
disableNameSuffixHash: true
patchesStrategicMerge:
- aws-configuration-patch.yaml
patches:
- path: aws-configuration-pipeline-patch.yaml
- path: aws-configuration-pipeline-ui-patch.yaml
# Identifier for application manager to apply ownerReference.
# The ownerReference ensures the resources get garbage collected
# when application is deleted.
Expand Down
2 changes: 1 addition & 1 deletion manifests/kustomize/env/azure/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow

bases:
resources:
- ../../base/installs/generic
- ../../base/metadata/base
- ../../third-party/argo/installs/namespace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
resources:
- ../../../third-party/application/cluster-scoped
- ../../../third-party/argo/installs/namespace/cluster-scoped
- ../../../base/pipeline/cluster-scoped
Loading

0 comments on commit af08576

Please sign in to comment.