X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=bin%2Finstall;h=2607acc7edda5e47c4ecee4383955ae513a5e530;hb=f947fc8a93f3a3363d2b300bfabbdf51240d4e26;hp=2a2424fa1fda1fa39f05e1cf1f8f294179e01352;hpb=1d417dcc634d51b240f373773698f46eeef77e84;p=ric-plt%2Fric-dep.git diff --git a/bin/install b/bin/install index 2a2424f..2607acc 100755 --- a/bin/install +++ b/bin/install @@ -62,6 +62,7 @@ function wait_for_cats() { } KERNEL_OPTIMIZATION=false +IS_HELM3=$(helm version --short|grep -e "^v3") while [ -n "$1" ]; do # while loop starts @@ -92,7 +93,12 @@ if [ -z "$OVERRIDEYAML" ];then exit 1 fi -HAS_COMMON_PACKAGE=$(helm search local/ric-common | grep ric-common) +if [ -z $IS_HELM3 ] +then + HAS_COMMON_PACKAGE=$(helm search local/ric-common | grep ric-common) +else + HAS_COMMON_PACKAGE=$(helm search repo local/ric-common | grep ric-common) +fi if [ -z "$HAS_COMMON_PACKAGE" ];then echo "****************************************************************************************************************" @@ -160,6 +166,12 @@ rules: - apiGroups: [""] resources: ["nodes"] verbs: ["list", "watch", "get"] + - apiGroups: [""] + resources: ["nodes/metrics"] + verbs: ["list", "watch", "get"] + - apiGroups: [""] + resources: ["nodes/proxy"] + verbs: ["list", "watch", "get"] - apiGroups: ["configuration.konghq.com"] resources: ["kongconsumers"] verbs: ["get", "list", "watch"] @@ -175,6 +187,9 @@ rules: - apiGroups: ["networking.k8s.io"] resources: ["ingresses"] verbs: ["watch", "list", "get", "create", "delete", "update"] + - apiGroups: [""] + resources: ["ingresses"] + verbs: ["watch", "list", "get", "create", "delete", "update"] - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["watch", "list", "get", "create", "delete"] @@ -183,12 +198,19 @@ rules: verbs: ["watch", "list", "get", "create", "delete"] - apiGroups: ["extensions"] resources: ["ingresses/status"] - verbs: ["update"] + verbs: ["update", "get", "list", "watch"] - apiGroups: ["networking.k8s.io"] resources: ["ingresses/status"] - verbs: ["update"] + verbs: ["update", "get", "list", "watch"] + - apiGroups: ["certificates.k8s.io"] + resources: ["certificatesigningrequests"] + verbs: ["list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["list", "watch"] + - nonResourceURLs: ["/metrics"] + verbs: ["get"] --- - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -202,8 +224,12 @@ subjects: name: tiller namespace: kube-system EOF -kubectl apply -f ricplt-role.yaml -rm ricplt-role.yaml + +if [ -z $IS_HELM3 ] +then + kubectl apply -f ricplt-role.yaml + rm ricplt-role.yaml +fi # Add kernel optimization for radis services @@ -262,8 +288,13 @@ fi for component in $COMPONENTS; do helm dep up $DIR/../helm/$component - helm install -f $OVERRIDEYAML --namespace "${PLTNAMESPACE:-ricplt}" --name "${RELEASE_PREFIX}-$component" $DIR/../helm/$component - sleep 3 + COMPONENT="${RELEASE_PREFIX}-$component" + if [ -z $IS_HELM3 ] + then + COMPONENT=" --name $COMPONENT" + fi + helm install -f $OVERRIDEYAML --namespace "${PLTNAMESPACE:-ricplt}" $COMPONENT $DIR/../helm/$component + sleep 8 done