diff options
Diffstat (limited to 'kubernetes/oneclick')
-rwxr-xr-x | kubernetes/oneclick/createAll.bash | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash index 72d852ded6..0a656ee22e 100755 --- a/kubernetes/oneclick/createAll.bash +++ b/kubernetes/oneclick/createAll.bash @@ -84,7 +84,13 @@ create_onap_helm() { fi fi - cmd=`echo helm install $LOCATION/$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3 ${HELM_VALUES_ADDITION}` + # assign default auth token + if [[ -z $ONAP_DEFAULT_AUTH_TOKEN ]]; then + DEFAULT_SECRET=`kubectl get secrets -n kube-system | grep default-token | awk '{ print $1}'` + ONAP_DEFAULT_AUTH_TOKEN=`kubectl get secrets $DEFAULT_SECRET -n kube-system -o yaml | grep 'token:' | awk '{ print $2}' | base64 -d` + fi + + cmd=`echo helm install $LOCATION/$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3,kubeMasterAuthToken=$ONAP_DEFAULT_AUTH_TOKEN ${HELM_VALUES_ADDITION}` eval ${cmd} check_return_code $cmd } |