-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Manifest] Apply kustomize best practices to standalone manifest (#3978)
* Use configMapKeyRef for env vars * Allow easy customization of cluster-scoped resources namespace * clean up * Clean up * Simplify var replacement with direct configmap value ref * clean up params.env
- Loading branch information
Showing
26 changed files
with
79 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ase/cache-deployer/cache-deployer-sa.yaml → ...yer/cluster-scoped/cache-deployer-sa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kubeflow-pipelines-cache-deployer-sa | ||
name: kubeflow-pipelines-cache-deployer-sa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 17 additions & 18 deletions
35
manifests/kustomize/cluster-scoped-resources/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: kubeflow | ||
|
||
resources: | ||
- namespace.yaml | ||
bases: | ||
- ../base/application/cluster-scoped | ||
- ../base/argo/cluster-scoped | ||
- ../base/pipeline/cluster-scoped | ||
- ../base/cache-deployer/cluster-scoped | ||
|
||
resources: | ||
- namespace.yaml | ||
|
||
# Used by Kustomize | ||
configMapGenerator: | ||
- name: pipeline-cluster-scoped-install-config | ||
env: params.env | ||
|
||
vars: | ||
- name: NAMESPACE | ||
objref: | ||
kind: ConfigMap | ||
name: pipeline-cluster-scoped-install-config | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.namespace | ||
|
||
# NOTE: var name must be unique globally to allow composition of multiple kustomize | ||
# packages. Therefore, we added prefix `kfp-cluster-scoped-` to distinguish it from | ||
# others. | ||
- name: kfp-cluster-scoped-namespace | ||
objref: | ||
# cache deployer 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. | ||
kind: ServiceAccount | ||
name: kubeflow-pipelines-cache-deployer-sa | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: metadata.namespace | ||
configurations: | ||
- params.yaml | ||
- params.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: $(NAMESPACE) | ||
name: '$(kfp-cluster-scoped-namespace)' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,3 @@ | |
varReference: | ||
- path: metadata/name | ||
kind: Namespace | ||
- path: subjects/namespace | ||
kind: ClusterRoleBinding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
manifests/kustomize/env/gcp/gcp-default-config/gcp-default-configmap.yaml
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
manifests/kustomize/env/gcp/gcp-default-config/kustomization.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.