From 38ad8aa61c8cff3408be18283c5bf60aa49f7162 Mon Sep 17 00:00:00 2001
From: Renmin <renming@google.com>
Date: Tue, 21 Apr 2020 22:23:10 +0800
Subject: [PATCH] Clusterrolebinding is using namespace which not parametrized
 (#3573)

submit quick to make sure others won't got confused
---
 .../cache-deployer-clusterrolebinding.yaml           |  1 +
 manifests/kustomize/env/dev/kustomization.yaml       |  3 ++-
 manifests/kustomize/env/gcp/kustomization.yaml       |  3 ++-
 .../env/platform-agnostic/kustomization.yaml         |  3 ++-
 manifests/kustomize/sample/README.md                 |  2 +-
 manifests/kustomize/sample/kustomization.yaml        | 12 +++++++-----
 6 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/manifests/kustomize/base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml b/manifests/kustomize/base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
index dbe1a1cf654e..28f92cafae69 100644
--- a/manifests/kustomize/base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
+++ b/manifests/kustomize/base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
@@ -9,4 +9,5 @@ roleRef:
 subjects:
 - kind: ServiceAccount
   name: kubeflow-pipelines-cache-deployer-sa
+  # Here it should be changed or overwrite to well match with customized namespace
   namespace: kubeflow
\ No newline at end of file
diff --git a/manifests/kustomize/env/dev/kustomization.yaml b/manifests/kustomize/env/dev/kustomization.yaml
index a37b4545f05c..95ed3b188f46 100644
--- a/manifests/kustomize/env/dev/kustomization.yaml
+++ b/manifests/kustomize/env/dev/kustomization.yaml
@@ -11,5 +11,6 @@ bases:
 commonLabels:
   application-crd-id: kubeflow-pipelines
 
-# Replace with your namespace
+# !!! If you want to customize the namespace,
+# please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
 namespace: kubeflow
diff --git a/manifests/kustomize/env/gcp/kustomization.yaml b/manifests/kustomize/env/gcp/kustomization.yaml
index 7c3c50ca7774..9fd4e86c5456 100644
--- a/manifests/kustomize/env/gcp/kustomization.yaml
+++ b/manifests/kustomize/env/gcp/kustomization.yaml
@@ -14,7 +14,8 @@ bases:
 commonLabels:
   application-crd-id: kubeflow-pipelines
 
-# Replace with your namespace
+# !!! If you want to customize the namespace,
+# please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
 namespace: kubeflow
 
 patchesStrategicMerge:
diff --git a/manifests/kustomize/env/platform-agnostic/kustomization.yaml b/manifests/kustomize/env/platform-agnostic/kustomization.yaml
index 572040e89209..20db7f9b8bc0 100644
--- a/manifests/kustomize/env/platform-agnostic/kustomization.yaml
+++ b/manifests/kustomize/env/platform-agnostic/kustomization.yaml
@@ -12,7 +12,8 @@ bases:
 commonLabels:
   application-crd-id: kubeflow-pipelines
 
-# Replace with your namespace
+# !!! If you want to customize the namespace,
+# please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
 namespace: kubeflow
 
 images:
diff --git a/manifests/kustomize/sample/README.md b/manifests/kustomize/sample/README.md
index 6420f83679a7..bc1855981827 100644
--- a/manifests/kustomize/sample/README.md
+++ b/manifests/kustomize/sample/README.md
@@ -64,7 +64,7 @@ kubectl apply -k sample/
 # If upper one action got failed, e.x. you used wrong value, try delete, fix and apply again
 # kubectl delete -k sample/
 
-kubectl wait applications/mypipeline -n mykubeflow --for condition=Ready --timeout=1800s
+kubectl wait applications/mypipeline -n kubeflow --for condition=Ready --timeout=1800s
 ```
 
 Now you can find the installation in [Console](http://console.cloud.google.com/ai-platform/pipelines)
diff --git a/manifests/kustomize/sample/kustomization.yaml b/manifests/kustomize/sample/kustomization.yaml
index 7dd5f106c268..3300e2977840 100644
--- a/manifests/kustomize/sample/kustomization.yaml
+++ b/manifests/kustomize/sample/kustomization.yaml
@@ -16,10 +16,12 @@ secretGenerator:
     env: params-db-secret.env
     behavior: merge
 
+# !!! If you want to customize the namespace,
+# please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml
+namespace: kubeflow
+
 #### Customization ###
-# 1. Replace with your namespace
-namespace: mykubeflow
-# 2. Change values in params.env file
-# 3. Change values in params-db-secret.env file for CloudSQL username and password
-# 4. kubectl apply -k ./
+# 1. Change values in params.env file
+# 2. Change values in params-db-secret.env file for CloudSQL username and password
+# 3. kubectl apply -k ./
 ####