Fix the cnf pod restart issue 81/4581/1 21.12.02
authorLe Yao <le.yao@intel.com>
Fri, 24 Dec 2021 07:44:34 +0000 (07:44 +0000)
committerLe Yao <le.yao@intel.com>
Fri, 24 Dec 2021 07:45:22 +0000 (07:45 +0000)
Signed-off-by: Le Yao <le.yao@intel.com>
Change-Id: Ieb3f5b6dd66bb38ed79656b767c07b614061d9cf

platform/deployment/examples/cnfservice.yaml
platform/deployment/helm/sdewan_cnf/templates/cm.yaml

index e2671a4..5619106 100644 (file)
@@ -3,7 +3,7 @@ kind: CNFService
 metadata:
   name: cnfservice-sample
   labels:
-    sdewanPurpose: sdewan-safe
+    sdewanPurpose: base
 spec:
     fullname: nginx.default.svc.cluster.local
     port: "8866"
index 5616207..e652e59 100644 (file)
@@ -27,7 +27,6 @@ data:
         option local_source 'lan'
     EOF
 
-    defaultip=$(grep "\podIP\b" /tmp/podinfo/annotations | cut -d/ -f2 | cut -d'"' -f2)
     providerip=$(echo {{ .Values.providerCIDR }} | cut -d/ -f1)
     sep="."
     suf="0"
@@ -73,6 +72,7 @@ data:
     /etc/init.d/dropbear start
     /etc/init.d/mwan3 restart
     /etc/init.d/firewall restart
+    defaultip=$(grep "\podIP\b" /tmp/podinfo/annotations | cut -d/ -f2 | cut -d'"' -f2)
     for net in $(echo -e $networks | jq -c ".interface[]")
     do
         interface=$(echo $net | jq -r .interface)