Fix spgwc fails to fetch spgwu IP
Add more strict check for fetching SPGWU IP.
Change-Id: Ib67690e04bccc40bcf703ff63716f94a08085636
diff --git a/mcord-release/mcord-services/Chart.yaml b/mcord-release/mcord-services/Chart.yaml
index e5db2a8..b962502 100644
--- a/mcord-release/mcord-services/Chart.yaml
+++ b/mcord-release/mcord-services/Chart.yaml
@@ -18,4 +18,4 @@
appVersion: "1.0"
description: M-CORD services with OMEC inside
name: mcord-services
-version: 0.1.4
+version: 0.1.5
diff --git a/mcord-release/mcord-services/templates/spgwc.yaml b/mcord-release/mcord-services/templates/spgwc.yaml
index 3d83b33..326991c 100644
--- a/mcord-release/mcord-services/templates/spgwc.yaml
+++ b/mcord-release/mcord-services/templates/spgwc.yaml
@@ -464,7 +464,7 @@
image: {{ .Values.spgwc.initimage }}
command: ["/bin/sh", "-co", "pipefail"]
args:
- - until $(kubectl get pod -ojson spgwu-0 2>/dev/null | jq -r '.metadata.annotations["k8s.v1.cni.cncf.io/networks-status"]' | jq -r '.[] | select(.name=="s1u-net") | .ips[0]' > /opt/cp/config/shared/SGW_S1U_IP);
+ - until $(kubectl get pod -ojson spgwu-0 2>/dev/null | jq -r '.metadata.annotations["k8s.v1.cni.cncf.io/networks-status"]' | jq -r '.[] | select(.name=="s1u-net") | .ips[0]' > /opt/cp/config/shared/SGW_S1U_IP | [ -s /opt/cp/config/shared/SGW_S1U_IP ]);
do echo "waiting for SPGWU"; sleep 2; done
volumeMounts:
- name: shared-data