summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortzvika <tzvika.avni@amdocs.com>2018-01-11 10:41:47 +0200
committerAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-01-15 15:46:46 +0000
commit58a0c10a49c79962adfd43d179ad8043c5aa1e81 (patch)
tree6e807c5f66ad6f468064e8439f996eb4fb8ef093
parent8a36a9e441ce46ebe4e5fe46eaafd85d51f2db95 (diff)
Wrong value is assigned to kube2msb AUTH_TOKEN
Wrong value is assigned to kube2msb AUTH_TOKEN environment variable through values.yaml file Change-Id: I19814bf5c11ed4d1104ba56ce79e5cc01819cbbe Issue-ID: OOM-570 Signed-off-by: tzvika <tzvika.avni@amdocs.com>
-rw-r--r--kubernetes/kube2msb/values.yaml1
-rwxr-xr-xkubernetes/oneclick/createAll.bash8
2 files changed, 7 insertions, 2 deletions
diff --git a/kubernetes/kube2msb/values.yaml b/kubernetes/kube2msb/values.yaml
index 65200c39f1..2daccee4ae 100644
--- a/kubernetes/kube2msb/values.yaml
+++ b/kubernetes/kube2msb/values.yaml
@@ -4,4 +4,3 @@ image:
kube2msb: nexus3.onap.org:10001/onap/oom/kube2msb
kubeMasterUrl: https://kubernetes.default.svc.cluster.local:443
discoveryUrl: http://msb-discovery.onap-msb:10081
-kubeMasterAuthToken: QmFzaWMgTURrd056VXdSVEk1TVRGRk9UaEVOREJCTWprNlpHTnlaSGt4YzJsSVlsRlVZVU16WTFsUk1XWnZhV0UyY21GRWEwNUhkMDFDVWxORVRIUmlZUT09
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
}