Remove nsPrefix references from consul chart
[oom.git] / kubernetes / consul / resources / config / consul-agent-config / scripts / model-loader-script.sh
index 9a4b4df..a8babec 100755 (executable)
@@ -1,8 +1,8 @@
 
-NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "aai-model-loader[^[:space:]]*")
+NAME=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "aai-model-loader[^[:space:]]*")
 
 if [ -n "$NAME" ]; then
-   if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- ps -efww | grep 'java' | grep 'model-loader' > /dev/null; then
+   if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $NAME -- ps -efww | grep 'java' | grep 'model-loader' > /dev/null; then
 
       echo Success. Model Loader process is running. 2>&1
       exit 0