summaryrefslogtreecommitdiffstats
path: root/kubernetes/oneclick/createAll.bash
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/oneclick/createAll.bash')
-rwxr-xr-xkubernetes/oneclick/createAll.bash8
1 files changed, 8 insertions, 0 deletions
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash
index 8d41ee45a6..c23f01456a 100755
--- a/kubernetes/oneclick/createAll.bash
+++ b/kubernetes/oneclick/createAll.bash
@@ -26,6 +26,11 @@ check_return_code(){
fi
}
+create_service_account() {
+ cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1-$2:default`
+ eval ${cmd}
+ check_return_code $cmd
+}
create_namespace() {
cmd=`echo kubectl create namespace $1-$2`
@@ -164,6 +169,9 @@ for i in ${HELM_APPS[@]}; do
printf "\nCreating namespace **********\n"
create_namespace $NS $i
+ printf "\nCreating service account **********\n"
+ create_service_account $NS $i
+
printf "\nCreating registry secret **********\n"
create_registry_key $NS $i ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL