# This enables/disables the PV creation for kong
# PV creation is necessary when there is no default storage class
# This should be set to false when there is a default storage class, Which lets the PVC provisions the PV dynamically.
+ # In SMO installation, this is handled as part of smo-install/scripts/sub-scripts/install-nonrtric.sh script
enabled: true
controlpanel:
MODE=$2
+defaultSc=$(kubectl get storageclass -o jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}')
+kongPvEnabled=true
+if [ -n "$defaultSc" ]; then
+ echo "Default storage is set to : $defaultSc. Setting kong.kongpv.enable to false"
+ kongPvEnabled=false
+fi
+
+
if [ "$MODE" == "dev" ]; then
echo "Installing NONRTRIC in dev mode"
- helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3"
+ helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3" --set kong.kongpv.enable=$kongPvEnabled
else
echo "Installing NONRTRIC in release mode"
# This following should be modified once the charts are uploaded and available in the nexus repository
# helm repo add nonrtric https://nexus3.o-ran-sc.org/repository/smo-helm-snapshots/
# helm repo update
# helm install oran-nonrtric nonrtric/nonrtric --namespace nonrtric -f $OVERRIDEYAML --create-namespace
- helm install oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3"
+ helm install oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3" --set kong.kongpv.enable=$kongPvEnabled
fi