summaryrefslogtreecommitdiffstats
path: root/kubernetes/oneclick
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/oneclick')
-rwxr-xr-xkubernetes/oneclick/createAll.bash10
-rwxr-xr-xkubernetes/oneclick/deleteAll.bash8
2 files changed, 8 insertions, 10 deletions
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash
index b7d6a64ffb..488f920e91 100755
--- a/kubernetes/oneclick/createAll.bash
+++ b/kubernetes/oneclick/createAll.bash
@@ -27,8 +27,7 @@ check_return_code(){
}
create_service_account() {
-# cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1-$2:default`
- cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default`
+ cmd=`echo kubectl create clusterrolebinding $1-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default`
eval ${cmd}
check_return_code $cmd
}
@@ -39,7 +38,6 @@ create_namespace() {
}
create_registry_key() {
-# cmd=`echo kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7`
cmd=`echo kubectl --namespace $1 create secret docker-registry $2 --docker-server=$3 --docker-username=$4 --docker-password=$5 --docker-email=$6`
eval ${cmd}
check_return_code $cmd
@@ -179,15 +177,15 @@ then
printf "\nCreating registry secret **********\n"
create_registry_key $NS ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL
+
+ printf "\nCreating service account **********\n"
+ create_service_account $NS
fi
printf "\n\n********** Creating deployments for ${HELM_APPS[*]} ********** \n"
for i in ${HELM_APPS[@]}; do
- printf "\nCreating service account **********\n"
- create_service_account $NS $i
-
printf "\nCreating deployments and services **********\n"
create_onap_helm $NS $i $start
diff --git a/kubernetes/oneclick/deleteAll.bash b/kubernetes/oneclick/deleteAll.bash
index 52748bc933..9833af7909 100755
--- a/kubernetes/oneclick/deleteAll.bash
+++ b/kubernetes/oneclick/deleteAll.bash
@@ -7,12 +7,11 @@ delete_namespace() {
}
delete_service_account() {
- kubectl delete clusterrolebinding $1-$2-admin-binding
- printf "Service account $1-$2-admin-binding deleted.\n\n"
+ kubectl delete clusterrolebinding $1-admin-binding
}
delete_registry_key() {
- kubectl --namespace $1-$2 delete secret ${1}-docker-registry-key
+ kubectl --namespace $1 delete secret ${1}-docker-registry-key
}
delete_app_helm() {
@@ -134,13 +133,14 @@ printf "\n********** Cleaning up ONAP: ${ONAP_APPS[*]}\n"
for i in ${HELM_APPS[@]}; do
delete_app_helm $NS $i
- delete_service_account $NS $i
done
if [ "$SINGLE_COMPONENT" == "false" ]
then
delete_app_helm $NS "config"
delete_namespace $NS
+ delete_registry_key $NS
+ delete_service_account $NS
fi
if $WAIT_TERMINATE; then