X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-aux%2Fbin%2Finstall;h=917c9420058a1ab915f25ef76621c8816622f66c;hb=23c33124cc76a845c561c319feb10f7b817aff88;hp=360b32be8eed670a1f1bb184c2bae993ec5871be;hpb=dc00cdf008775e2ac5dddb186d1eb81e80370b69;p=it%2Fdep.git diff --git a/ric-aux/bin/install b/ric-aux/bin/install index 360b32be..917c9420 100755 --- a/ric-aux/bin/install +++ b/ric-aux/bin/install @@ -133,6 +133,28 @@ if [ -z "$FOUND_STORAGECLASS" ] && $LABELFOUND; then fi +LABELFOUND=false +for f in $NODENAME; do + LABEL=$(kubectl describe node $f | grep "portal-storage=enable") + if [ ! -z "$LABEL" ]; then + LABELFOUND=true + fi +done + +if ! $LABELFOUND; then + echo "***********************************************************************************************" + echo "* ERROR!!!!!!!!!!!!! *" + echo "***********************************************************************************************" + echo "* Nodes label \"portal-storage=enable\" is not found in any of the cluster node. *" + echo "* Please pick a node and label it using the following command. i *" + echo "* kubectl label --overwrite nodes portal-storage=enable *" + echo "***********************************************************************************************" + + exit 1 +fi + + + if ! kubectl get ns ${AUXNAMESPACE:-ricaux}> /dev/null 2>&1; then kubectl create ns ${AUXNAMESPACE:-ricaux} fi @@ -143,9 +165,80 @@ if ! kubectl get ns onap > /dev/null 2>&1; then kubectl create ns onap fi + + +echo Add cluster roles + cat >ricaux-role.yaml <