diff --git a/manifests/kustomize/base/installs/generic/kustomization.yaml b/manifests/kustomize/base/installs/generic/kustomization.yaml index 4ef5fd2471f..527a3156310 100644 --- a/manifests/kustomize/base/installs/generic/kustomization.yaml +++ b/manifests/kustomize/base/installs/generic/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/base/installs/generic/postgres/kustomization.yaml b/manifests/kustomize/base/installs/generic/postgres/kustomization.yaml index 21ca80694ae..573a94d463f 100644 --- a/manifests/kustomize/base/installs/generic/postgres/kustomization.yaml +++ b/manifests/kustomize/base/installs/generic/postgres/kustomization.yaml @@ -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: diff --git a/manifests/kustomize/base/installs/multi-user/kustomization.yaml b/manifests/kustomize/base/installs/multi-user/kustomization.yaml index 72ebaf7ea30..cca7b491c0f 100644 --- a/manifests/kustomize/base/installs/multi-user/kustomization.yaml +++ b/manifests/kustomize/base/installs/multi-user/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/base/metadata/overlays/db/kustomization.yaml b/manifests/kustomize/base/metadata/overlays/db/kustomization.yaml index fa67b8a9667..d28419d8620 100644 --- a/manifests/kustomize/base/metadata/overlays/db/kustomization.yaml +++ b/manifests/kustomize/base/metadata/overlays/db/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/base/metadata/overlays/postgres/kustomization.yaml b/manifests/kustomize/base/metadata/overlays/postgres/kustomization.yaml index 9f78bf3bbc9..0dd85682a9e 100644 --- a/manifests/kustomize/base/metadata/overlays/postgres/kustomization.yaml +++ b/manifests/kustomize/base/metadata/overlays/postgres/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/base/pipeline/kfp-launcher-configmap.yaml b/manifests/kustomize/base/pipeline/kfp-launcher-configmap.yaml index 13f60514a32..342db73cab4 100644 --- a/manifests/kustomize/base/pipeline/kfp-launcher-configmap.yaml +++ b/manifests/kustomize/base/pipeline/kfp-launcher-configmap.yaml @@ -3,4 +3,4 @@ kind: ConfigMap metadata: name: kfp-launcher data: - defaultPipelineRoot: $(kfp-default-pipeline-root) + defaultPipelineRoot: $(kfp-default-pipeline-root) diff --git a/manifests/kustomize/base/pipeline/kustomization.yaml b/manifests/kustomize/base/pipeline/kustomization.yaml index 492b72b00dd..acaaf9280b2 100644 --- a/manifests/kustomize/base/pipeline/kustomization.yaml +++ b/manifests/kustomize/base/pipeline/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/base/postgresql/cache/kustomization.yaml b/manifests/kustomize/base/postgresql/cache/kustomization.yaml index d4935432cc5..3448a480068 100644 --- a/manifests/kustomize/base/postgresql/cache/kustomization.yaml +++ b/manifests/kustomize/base/postgresql/cache/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/base/postgresql/pipeline/kustomization.yaml b/manifests/kustomize/base/postgresql/pipeline/kustomization.yaml index 3f87400eb32..59e2d7d9919 100644 --- a/manifests/kustomize/base/postgresql/pipeline/kustomization.yaml +++ b/manifests/kustomize/base/postgresql/pipeline/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/cluster-scoped-resources/kustomization.yaml b/manifests/kustomize/cluster-scoped-resources/kustomization.yaml index df0f654c0f8..db34bc7490c 100644 --- a/manifests/kustomize/cluster-scoped-resources/kustomization.yaml +++ b/manifests/kustomize/cluster-scoped-resources/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/env/aws/aws-configuration-patch.yaml b/manifests/kustomize/env/aws/aws-configuration-pipeline-patch.yaml similarity index 55% rename from manifests/kustomize/env/aws/aws-configuration-patch.yaml rename to manifests/kustomize/env/aws/aws-configuration-pipeline-patch.yaml index d008e3bc767..598d8c4d213 100644 --- a/manifests/kustomize/env/aws/aws-configuration-patch.yaml +++ b/manifests/kustomize/env/aws/aws-configuration-pipeline-patch.yaml @@ -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: @@ -58,4 +29,4 @@ spec: key: minioServiceRegion - name: OBJECTSTORECONFIG_PORT value: "" - name: ml-pipeline-api-server \ No newline at end of file + name: ml-pipeline-api-server diff --git a/manifests/kustomize/env/aws/aws-configuration-pipeline-ui-patch.yaml b/manifests/kustomize/env/aws/aws-configuration-pipeline-ui-patch.yaml new file mode 100644 index 00000000000..2a4de3838e1 --- /dev/null +++ b/manifests/kustomize/env/aws/aws-configuration-pipeline-ui-patch.yaml @@ -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 diff --git a/manifests/kustomize/env/aws/kustomization.yaml b/manifests/kustomize/env/aws/kustomization.yaml index 50bb9d3a83f..c3f3ab9afc1 100644 --- a/manifests/kustomize/env/aws/kustomization.yaml +++ b/manifests/kustomize/env/aws/kustomization.yaml @@ -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. diff --git a/manifests/kustomize/env/azure/kustomization.yaml b/manifests/kustomize/env/azure/kustomization.yaml index 39b9c7d95c6..3bc71cfdf7e 100644 --- a/manifests/kustomize/env/azure/kustomization.yaml +++ b/manifests/kustomize/env/azure/kustomization.yaml @@ -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 diff --git a/manifests/kustomize/env/cert-manager/cluster-scoped-resources/kustomization.yaml b/manifests/kustomize/env/cert-manager/cluster-scoped-resources/kustomization.yaml index c5df9e990b1..a2a1d68f1d0 100644 --- a/manifests/kustomize/env/cert-manager/cluster-scoped-resources/kustomization.yaml +++ b/manifests/kustomize/env/cert-manager/cluster-scoped-resources/kustomization.yaml @@ -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 \ No newline at end of file diff --git a/manifests/kustomize/env/cert-manager/dev/kustomization.yaml b/manifests/kustomize/env/cert-manager/dev/kustomization.yaml index e4dc5ed0095..5fab4ac8a2a 100644 --- a/manifests/kustomize/env/cert-manager/dev/kustomization.yaml +++ b/manifests/kustomize/env/cert-manager/dev/kustomization.yaml @@ -1,36 +1,33 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: - - ../../dev - - ../base namespace: kubeflow -# Delete the cache deployer as we use the cert-manager instead -patchesStrategicMerge: - - ./delete-cache-deployer.yaml - resources: +- ../../dev +- ../base - namespace.yaml -vars: # NOTE: var name must be unique globally to allow composition of multiple kustomize # packages. Therefore, we added prefix `kfp-dev-` to distinguish it from # others. -- name: kfp-dev-namespace - objref: # ml-pipeline sa's metadata.namespace will be first transformed by namespace field in kustomization.yaml # so that we only need to change kustomization.yaml's namespace field for namespace customization. +vars: +- fieldref: + fieldPath: metadata.namespace + name: kfp-dev-namespace + objref: + apiVersion: v1 kind: ServiceAccount name: ml-pipeline - apiVersion: v1 - fieldref: - fieldpath: metadata.namespace configurations: - params.yaml # Pass proper arguments to cache-server to use cert-manager certificate +# Delete the cache deployer as we use the cert-manager instead patches: +- path: ./delete-cache-deployer.yaml - patch: |- - op: add path: /spec/template/spec/containers/0/args/- diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/delete-cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/delete-cache-deployer.yaml deleted file mode 100644 index de57ccce1b7..00000000000 --- a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/delete-cache-deployer.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Delete cache deployer as we use the cert-manager instead -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kubeflow-pipelines-cache-deployer-clusterrole -$patch: delete ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kubeflow-pipelines-cache-deployer-clusterrolebinding -$patch: delete ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kubeflow-pipelines-cache-deployer-sa -$patch: delete ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cache-deployer-deployment -$patch: delete ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: kubeflow-pipelines-cache-deployer-role -$patch: delete ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: kubeflow-pipelines-cache-deployer-rolebinding -$patch: delete \ No newline at end of file diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/kustomization.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/kustomization.yaml index 3d218487890..860c6e13a3a 100644 --- a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/kustomization.yaml +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/kustomization.yaml @@ -1,28 +1,31 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: - ../../platform-agnostic-multi-user - ../base namespace: kubeflow -# Delete the cache deployer as we use the cert-manager instead -patchesStrategicMerge: - - ./delete-cache-deployer.yaml - # Pass proper arguments to cache-server to use cert-manager certificate patches: -- patch: |- - - op: add - path: /spec/template/spec/containers/0/args/- - value: "--tls_cert_filename=tls.crt" - target: - kind: Deployment - name: cache-server -- patch: |- - - op: add - path: /spec/template/spec/containers/0/args/- - value: "--tls_key_filename=tls.key" - target: - kind: Deployment - name: cache-server + # Delete the cache deployer as we use the cert-manager instead + - path: patches/delete.clusterrole.cache-deployer.yaml + - path: patches/delete.crb.cache-deployer.yaml + - path: patches/delete.deployment.cache-deployer.yaml + - path: patches/delete.role.cache-deployer.yaml + - path: patches/delete.rolebinding.cache-deployer.yaml + - path: patches/delete.sa.cache-deployer.yaml + - patch: |- + - op: add + path: /spec/template/spec/containers/0/args/- + value: "--tls_cert_filename=tls.crt" + target: + kind: Deployment + name: cache-server + - patch: |- + - op: add + path: /spec/template/spec/containers/0/args/- + value: "--tls_key_filename=tls.key" + target: + kind: Deployment + name: cache-server diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.clusterrole.cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.clusterrole.cache-deployer.yaml new file mode 100644 index 00000000000..43a388e6191 --- /dev/null +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.clusterrole.cache-deployer.yaml @@ -0,0 +1,6 @@ +# Delete cache deployer as we use the cert-manager instead +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kubeflow-pipelines-cache-deployer-clusterrole +$patch: delete diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.crb.cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.crb.cache-deployer.yaml new file mode 100644 index 00000000000..b8e98ada823 --- /dev/null +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.crb.cache-deployer.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubeflow-pipelines-cache-deployer-clusterrolebinding +$patch: delete diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.deployment.cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.deployment.cache-deployer.yaml new file mode 100644 index 00000000000..b66869c7087 --- /dev/null +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.deployment.cache-deployer.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cache-deployer-deployment +$patch: delete diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.role.cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.role.cache-deployer.yaml new file mode 100644 index 00000000000..0d67736c0aa --- /dev/null +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.role.cache-deployer.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: kubeflow-pipelines-cache-deployer-role +$patch: delete diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.rolebinding.cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.rolebinding.cache-deployer.yaml new file mode 100644 index 00000000000..c06f9b7e868 --- /dev/null +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.rolebinding.cache-deployer.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kubeflow-pipelines-cache-deployer-rolebinding +$patch: delete diff --git a/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.sa.cache-deployer.yaml b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.sa.cache-deployer.yaml new file mode 100644 index 00000000000..3fe1dda5405 --- /dev/null +++ b/manifests/kustomize/env/cert-manager/platform-agnostic-multi-user/patches/delete.sa.cache-deployer.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kubeflow-pipelines-cache-deployer-sa +$patch: delete diff --git a/manifests/kustomize/env/dev/kustomization.yaml b/manifests/kustomize/env/dev/kustomization.yaml index 23030cea7c3..acb58bd4b29 100644 --- a/manifests/kustomize/env/dev/kustomization.yaml +++ b/manifests/kustomize/env/dev/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: # Application controller is used to provide Google Cloud Console integration. - ../../third-party/application - ../../base/application diff --git a/manifests/kustomize/env/dev/postgresql/kustomization.yaml b/manifests/kustomize/env/dev/postgresql/kustomization.yaml index 25aec96ef09..2a6c495d086 100644 --- a/manifests/kustomize/env/dev/postgresql/kustomization.yaml +++ b/manifests/kustomize/env/dev/postgresql/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: # Application controller is used to provide Google Cloud Console integration. - ../../../third-party/application - ../../../base/application diff --git a/manifests/kustomize/env/gcp/kustomization.yaml b/manifests/kustomize/env/gcp/kustomization.yaml index e96b88413fb..d4a81b02415 100644 --- a/manifests/kustomize/env/gcp/kustomization.yaml +++ b/manifests/kustomize/env/gcp/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: # Application controller is used to provide Google Cloud Console integration. - ../../third-party/application - ../../base/application @@ -22,8 +22,8 @@ commonLabels: # please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml namespace: kubeflow -patchesStrategicMerge: - - gcp-configurations-patch.yaml +patches: + - path: gcp-configurations-patch.yaml # Used by Kustomize configMapGenerator: diff --git a/manifests/kustomize/env/platform-agnostic-emissary/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-emissary/kustomization.yaml index b0f866295b9..829b0983886 100644 --- a/manifests/kustomize/env/platform-agnostic-emissary/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-emissary/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../platform-agnostic +resources: + - ../platform-agnostic -patchesStrategicMerge: -- workflow-controller-configmap-patch.yaml +patches: + - path: workflow-controller-configmap-patch.yaml diff --git a/manifests/kustomize/env/platform-agnostic-multi-user-emissary/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-multi-user-emissary/kustomization.yaml index 42dda7adc03..0a68cc4dfd0 100644 --- a/manifests/kustomize/env/platform-agnostic-multi-user-emissary/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-multi-user-emissary/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../platform-agnostic-multi-user +resources: + - ../platform-agnostic-multi-user -patchesStrategicMerge: -- workflow-controller-configmap-patch.yaml +patches: + - path: workflow-controller-configmap-patch.yaml diff --git a/manifests/kustomize/env/platform-agnostic-multi-user-legacy/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-multi-user-legacy/kustomization.yaml index 6800d9e0102..a8b94583417 100644 --- a/manifests/kustomize/env/platform-agnostic-multi-user-legacy/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-multi-user-legacy/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: - ../../base/installs/multi-user - ../../base/metadata/overlays/db - ../../base/metadata/options/istio diff --git a/manifests/kustomize/env/platform-agnostic-multi-user-pns/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-multi-user-pns/kustomization.yaml index 42dda7adc03..0a68cc4dfd0 100644 --- a/manifests/kustomize/env/platform-agnostic-multi-user-pns/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-multi-user-pns/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../platform-agnostic-multi-user +resources: + - ../platform-agnostic-multi-user -patchesStrategicMerge: -- workflow-controller-configmap-patch.yaml +patches: + - path: workflow-controller-configmap-patch.yaml diff --git a/manifests/kustomize/env/platform-agnostic-multi-user/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-multi-user/kustomization.yaml index 1ea99e57eef..8196133b367 100644 --- a/manifests/kustomize/env/platform-agnostic-multi-user/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-multi-user/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: - ../../base/installs/multi-user - ../../base/metadata/base - ../../base/metadata/options/istio diff --git a/manifests/kustomize/env/platform-agnostic-pns/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-pns/kustomization.yaml index b0f866295b9..829b0983886 100644 --- a/manifests/kustomize/env/platform-agnostic-pns/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-pns/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../platform-agnostic +resources: + - ../platform-agnostic -patchesStrategicMerge: -- workflow-controller-configmap-patch.yaml +patches: + - path: workflow-controller-configmap-patch.yaml diff --git a/manifests/kustomize/env/platform-agnostic-postgresql/kustomization.yaml b/manifests/kustomize/env/platform-agnostic-postgresql/kustomization.yaml index 00a9d4613b2..c13945a7a6f 100644 --- a/manifests/kustomize/env/platform-agnostic-postgresql/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic-postgresql/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: - ../../base/installs/generic/postgres - ../../base/metadata/overlays/postgres - ../../third-party/argo/installs/namespace diff --git a/manifests/kustomize/env/platform-agnostic/kustomization.yaml b/manifests/kustomize/env/platform-agnostic/kustomization.yaml index cb840c9689f..b1efdbcdc2d 100644 --- a/manifests/kustomize/env/platform-agnostic/kustomization.yaml +++ b/manifests/kustomize/env/platform-agnostic/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: - ../../base/installs/generic - ../../base/metadata/base - ../../third-party/argo/installs/namespace @@ -11,9 +11,11 @@ bases: # Identifier for application manager to apply ownerReference. # The ownerReference ensures the resources get garbage collected # when application is deleted. -commonLabels: - application-crd-id: kubeflow-pipelines # !!! If you want to customize the namespace, # please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml namespace: kubeflow +labels: + - includeSelectors: true + pairs: + application-crd-id: kubeflow-pipelines diff --git a/manifests/kustomize/hack/presubmit.sh b/manifests/kustomize/hack/presubmit.sh index 99cb0da92b2..e4334f980b1 100755 --- a/manifests/kustomize/hack/presubmit.sh +++ b/manifests/kustomize/hack/presubmit.sh @@ -23,7 +23,7 @@ TMP="$(mktemp -d)" pushd "${TMP}" # Install Kustomize -KUSTOMIZE_VERSION=3.10.0 +KUSTOMIZE_VERSION=5.2.1 # Reference: https://kubectl.docs.kubernetes.io/installation/kustomize/binaries/ curl -s -O "https://raw.githubusercontent.com/\ kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" diff --git a/manifests/kustomize/sample/cluster-scoped-resources/kustomization.yaml b/manifests/kustomize/sample/cluster-scoped-resources/kustomization.yaml index 83c54aa99c3..8b4d2b87cff 100644 --- a/manifests/kustomize/sample/cluster-scoped-resources/kustomization.yaml +++ b/manifests/kustomize/sample/cluster-scoped-resources/kustomization.yaml @@ -5,6 +5,6 @@ kind: Kustomization # please also update sample/kustomization.yaml's namespace field to the same value namespace: kubeflow -bases: +resources: # Or github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=1.0.0 - ../../cluster-scoped-resources diff --git a/manifests/kustomize/sample/kustomization.yaml b/manifests/kustomize/sample/kustomization.yaml index 3af7efd42bc..e8bf361dd5f 100644 --- a/manifests/kustomize/sample/kustomization.yaml +++ b/manifests/kustomize/sample/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: +resources: # Or github.com/kubeflow/pipelines/manifests/kustomize/env/gcp?ref=1.0.0 - ../env/gcp # Kubeflow Pipelines servers are capable of collecting Prometheus metrics. @@ -31,7 +31,6 @@ secretGenerator: # !!! If you want to customize the namespace, # please also update sample/cluster-scoped-resources/kustomization.yaml's namespace field to the same value namespace: kubeflow - #### Customization ### # 1. Change values in params.env file # 2. Change values in params-db-secret.env file for CloudSQL username and password diff --git a/manifests/kustomize/third-party/argo/base/kustomization.yaml b/manifests/kustomize/third-party/argo/base/kustomization.yaml index 81c3b931643..023efc5dabe 100644 --- a/manifests/kustomize/third-party/argo/base/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/base/kustomization.yaml @@ -1,14 +1,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../upstream/manifests/base/workflow-controller +resources: + - ../upstream/manifests/base/workflow-controller -patchesStrategicMerge: -- workflow-controller-deployment-patch.yaml -- workflow-controller-configmap-patch.yaml +patches: + - path: workflow-controller-deployment-patch.yaml + - path: workflow-controller-configmap-patch.yaml # Allow Kustomize vars to replace fields defined in params.yaml. # The vars can be defined anywhere. configurations: -- params.yaml + - params.yaml diff --git a/manifests/kustomize/third-party/argo/installs/cluster/kustomization.yaml b/manifests/kustomize/third-party/argo/installs/cluster/kustomization.yaml index 3bb1a466df2..3d53f0718d4 100644 --- a/manifests/kustomize/third-party/argo/installs/cluster/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/installs/cluster/kustomization.yaml @@ -1,18 +1,18 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -# Note, we do not explicitly separate cluster-scoped resources for cluster installation, -# because people who deploy cluster-scoped resources should be the same as who deploys -# namespaced resources. + # Note, we do not explicitly separate cluster-scoped resources for cluster installation, + # because people who deploy cluster-scoped resources should be the same as who deploys + # namespaced resources. +resources: - ../../upstream/manifests/base/crds - ../../upstream/manifests/cluster-install/workflow-controller-rbac - ../../base -patchesJson6902: -- target: +patches: +- path: workflow-controller-clusterrolebinding-patch.json + target: group: rbac.authorization.k8s.io - version: v1 kind: ClusterRoleBinding name: argo-binding - path: workflow-controller-clusterrolebinding-patch.json \ No newline at end of file + version: v1 diff --git a/manifests/kustomize/third-party/argo/installs/namespace/cluster-scoped/kustomization.yaml b/manifests/kustomize/third-party/argo/installs/namespace/cluster-scoped/kustomization.yaml index 86733da451f..3a040301b01 100644 --- a/manifests/kustomize/third-party/argo/installs/namespace/cluster-scoped/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/installs/namespace/cluster-scoped/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -# Minimal CRDs omit schema validation, recommended for production cluster. -- ../../../upstream/manifests/base/crds/minimal +resources: + # Minimal CRDs omit schema validation, recommended for production cluster. + - ../../../upstream/manifests/base/crds/minimal diff --git a/manifests/kustomize/third-party/argo/installs/namespace/kustomization.yaml b/manifests/kustomize/third-party/argo/installs/namespace/kustomization.yaml index 1a861c499cc..20b823bbadd 100644 --- a/manifests/kustomize/third-party/argo/installs/namespace/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/installs/namespace/kustomization.yaml @@ -6,14 +6,13 @@ kind: Kustomization # * this does not include argo server. # * this separates cluster-scoped resources to its own folder. -bases: -- ../../base -- ../../upstream/manifests/namespace-install/workflow-controller-rbac - -patchesJson6902: -- target: - version: v1 - group: apps - kind: Deployment - name: workflow-controller - path: workflow-controller-deployment-patch.json +resources: + - ../../base + - ../../upstream/manifests/namespace-install/workflow-controller-rbac +patches: + - path: workflow-controller-deployment-patch.json + target: + group: apps + kind: Deployment + name: workflow-controller + version: v1 diff --git a/manifests/kustomize/third-party/argo/upstream/manifests/namespace-install/kustomization.yaml b/manifests/kustomize/third-party/argo/upstream/manifests/namespace-install/kustomization.yaml index a3c7fe6fbcf..4692dbd32d2 100644 --- a/manifests/kustomize/third-party/argo/upstream/manifests/namespace-install/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/upstream/manifests/namespace-install/kustomization.yaml @@ -4,16 +4,16 @@ resources: - ../base - ./argo-server-rbac - ./workflow-controller-rbac -patchesJson6902: - - target: - version: v1 +patches: + - path: ./overlays/workflow-controller-deployment.yaml + target: group: apps kind: Deployment name: workflow-controller - path: ./overlays/workflow-controller-deployment.yaml - - target: version: v1 + - path: ./overlays/argo-server-deployment.yaml + target: group: apps kind: Deployment name: argo-server - path: ./overlays/argo-server-deployment.yaml + version: v1 diff --git a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/base/kustomization.yaml b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/base/kustomization.yaml index ceef08adfbf..028824f397d 100644 --- a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/base/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/base/kustomization.yaml @@ -15,6 +15,6 @@ resources: - agent-default-rolebinding.yaml - cluster-workflow-template-rbac.yaml - artifact-repositories-configmap.yaml -patchesStrategicMerge: - - overlays/workflow-controller-configmap.yaml - - overlays/argo-server-deployment.yaml +patches: + - path: overlays/workflow-controller-configmap.yaml + - path: overlays/argo-server-deployment.yaml diff --git a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/minimal/kustomization.yaml b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/minimal/kustomization.yaml index b376c091eba..00b4d98f3cf 100644 --- a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/minimal/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/minimal/kustomization.yaml @@ -2,5 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../base -patchesStrategicMerge: - - overlays/workflow-controller-configmap.yaml +patches: + - path: overlays/workflow-controller-configmap.yaml diff --git a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/mysql/kustomization.yaml b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/mysql/kustomization.yaml index edacf51ff4a..cf0cdb12f47 100644 --- a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/mysql/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/mysql/kustomization.yaml @@ -5,5 +5,5 @@ resources: - argo-mysql-config-secret.yaml - mysql-deployment.yaml - mysql-service.yaml -patchesStrategicMerge: - - overlays/workflow-controller-configmap.yaml +patches: + - path: overlays/workflow-controller-configmap.yaml diff --git a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/postgres/kustomization.yaml b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/postgres/kustomization.yaml index a70a0cc26b3..531c0291dae 100644 --- a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/postgres/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/postgres/kustomization.yaml @@ -5,5 +5,5 @@ resources: - argo-postgres-config-secret.yaml - postgres-deployment.yaml - postgres-service.yaml -patchesStrategicMerge: - - overlays/workflow-controller-configmap.yaml +patches: + - path: overlays/workflow-controller-configmap.yaml diff --git a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/sso/kustomization.yaml b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/sso/kustomization.yaml index 70aafea6549..ce3d3aa8e85 100644 --- a/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/sso/kustomization.yaml +++ b/manifests/kustomize/third-party/argo/upstream/manifests/quick-start/sso/kustomization.yaml @@ -3,6 +3,6 @@ kind: Kustomization resources: - ../base - dex -patchesStrategicMerge: - - overlays/workflow-controller-configmap.yaml - - overlays/argo-server-sa.yaml +patches: + - path: overlays/workflow-controller-configmap.yaml + - path: overlays/argo-server-sa.yaml diff --git a/test/deploy-pipeline-lite.sh b/test/deploy-pipeline-lite.sh index 36d7fd4db8d..d7f6b42a213 100755 --- a/test/deploy-pipeline-lite.sh +++ b/test/deploy-pipeline-lite.sh @@ -31,10 +31,12 @@ if ! which kustomize; then # Download kustomize cli tool TOOL_DIR=${DIR}/bin mkdir -p ${TOOL_DIR} - # Use 2.0.3 because we want it to be compatible with kubectl apply -k. - # The change in https://github.com/kubernetes-sigs/kustomize/blob/master/docs/v2.1.0.md#envs-field broke backward compatibility. - wget --no-verbose https://github.com/kubernetes-sigs/kustomize/releases/download/v2.0.3/kustomize_2.0.3_linux_amd64 \ - -O ${TOOL_DIR}/kustomize --no-verbose + # Use 5.2.1 because we want it to be compatible with latest kustomize syntax changes + # See discussions tracked in https://github.com/kubeflow/manifests/issues/2388 and https://github.com/kubeflow/manifests/pull/2653. + wget --no-verbose https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.2.1/kustomize_v5.2.1_linux_amd64.tar.gz \ + -O kustomize_linux_amd64.tar.gz + tar -xzvf kustomize_linux_amd64.tar.gz kustomize + mv kustomize ${TOOL_DIR}/kustomize chmod +x ${TOOL_DIR}/kustomize PATH=${PATH}:${TOOL_DIR} fi @@ -44,7 +46,7 @@ if [ -z "$KFP_DEPLOY_RELEASE" ]; then KFP_MANIFEST_DIR=${DIR}/manifests pushd ${KFP_MANIFEST_DIR}/cluster-scoped-resources - kubectl apply -k . + kustomize build | kubectl apply -f - kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io popd @@ -64,7 +66,7 @@ if [ -z "$KFP_DEPLOY_RELEASE" ]; then kustomize edit set image gcr.io/ml-pipeline/metadata-envoy=${GCR_IMAGE_BASE_DIR}/metadata-envoy:${GCR_IMAGE_TAG} cat kustomization.yaml - kubectl apply -k . + kustomize build | kubectl apply -f - popd else # exclude SDK release tags @@ -75,13 +77,13 @@ else git checkout $KFP_LATEST_RELEASE pushd ${KFP_MANIFEST_DIR}/cluster-scoped-resources - kubectl apply -k . + kustomize build | kubectl apply -f - kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io popd pushd ${KFP_MANIFEST_DIR}/dev - kubectl apply -k . + kustomize build | kubectl apply -f - popd # go back to previous commit diff --git a/test/manifests/cluster-scoped-resources/kustomization.yaml b/test/manifests/cluster-scoped-resources/kustomization.yaml index ba0dd590dad..12aff7cada4 100644 --- a/test/manifests/cluster-scoped-resources/kustomization.yaml +++ b/test/manifests/cluster-scoped-resources/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../../../manifests/kustomize/cluster-scoped-resources +resources: + - ../../../manifests/kustomize/cluster-scoped-resources diff --git a/test/manifests/dev/kustomization.yaml b/test/manifests/dev/kustomization.yaml index 0472248f60c..d22059dc3d3 100644 --- a/test/manifests/dev/kustomization.yaml +++ b/test/manifests/dev/kustomization.yaml @@ -3,17 +3,17 @@ kind: Kustomization # namespace is required to change generated configmap to correct namespace namespace: kubeflow -bases: -- ../../../manifests/kustomize/env/dev -patchesStrategicMerge: -- proxy-agent-patch.yaml -- workflow-controller-configmap-patch.yaml +resources: + - ../../../manifests/kustomize/env/dev +patches: + - path: proxy-agent-patch.yaml + - path: workflow-controller-configmap-patch.yaml # Used by Kustomize. configMapGenerator: -- behavior: merge - env: params.env - name: pipeline-install-config + - behavior: merge + env: params.env + name: pipeline-install-config # Actual image overrides will be added in test scripts. images: []