Update simapp, gnbsim helmcharts

gnbsim: update new image, update helm chart to have go-profile enable/disable control
simapp: image size reduction and update of dockerfile
readding all init containers which are creating timing issues in 5g-core

Change-Id: I34c243f04a45ee58a0e80dc42c6e4f1b8a575ef8
diff --git a/5g-control-plane/Chart.yaml b/5g-control-plane/Chart.yaml
index 193fea0..d4b471d 100644
--- a/5g-control-plane/Chart.yaml
+++ b/5g-control-plane/Chart.yaml
@@ -10,7 +10,7 @@
 name: 5g-control-plane
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.7.12
+version: 0.7.13
 
 dependencies:
   - name: mongodb
diff --git a/5g-control-plane/templates/deployment-ausf.yaml b/5g-control-plane/templates/deployment-ausf.yaml
index b5083e0..da8fcfa 100644
--- a/5g-control-plane/templates/deployment-ausf.yaml
+++ b/5g-control-plane/templates/deployment-ausf.yaml
@@ -35,8 +35,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-ausf-module2
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup ausf; do echo waiting for ausf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
 {{ tuple "ausf" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-nssf.yaml b/5g-control-plane/templates/deployment-nssf.yaml
index 0397d54..a1202b5 100644
--- a/5g-control-plane/templates/deployment-nssf.yaml
+++ b/5g-control-plane/templates/deployment-nssf.yaml
@@ -33,8 +33,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-nssf-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup nssf; do echo waiting for nssf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "nssf" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-pcf.yaml b/5g-control-plane/templates/deployment-pcf.yaml
index 91eebc5..7619c7f 100644
--- a/5g-control-plane/templates/deployment-pcf.yaml
+++ b/5g-control-plane/templates/deployment-pcf.yaml
@@ -33,8 +33,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-       {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-pcf-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup pcf; do echo waiting for pcf; sleep 4; done;']
+       {{- if .Values.config.coreDump.enabled }}
        {{ tuple "pcf" . | include "5g-control-plane.coredump_init" | indent 6 }}
        {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-sctplb.yaml b/5g-control-plane/templates/deployment-sctplb.yaml
index 945a7b7..d408b56 100644
--- a/5g-control-plane/templates/deployment-sctplb.yaml
+++ b/5g-control-plane/templates/deployment-sctplb.yaml
@@ -33,8 +33,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-nrf-module
+        image: {{ .Values.images.tags.init | quote }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup nrf; do echo waiting for nrf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "sctplb" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-smf.yaml b/5g-control-plane/templates/deployment-smf.yaml
index 971c5bd..d60c7f7 100644
--- a/5g-control-plane/templates/deployment-smf.yaml
+++ b/5g-control-plane/templates/deployment-smf.yaml
@@ -35,8 +35,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-smf-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup smf; do echo waiting for smf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "smf" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-udm.yaml b/5g-control-plane/templates/deployment-udm.yaml
index 36a6bdd..c362d00 100644
--- a/5g-control-plane/templates/deployment-udm.yaml
+++ b/5g-control-plane/templates/deployment-udm.yaml
@@ -33,8 +33,16 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-udm-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup udm; do echo waiting for udm; sleep 4; done;']
+      - name: wait-udr-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup udr; do echo waiting for udr; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "udm" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-udr.yaml b/5g-control-plane/templates/deployment-udr.yaml
index ac347d3..75bf1d7 100644
--- a/5g-control-plane/templates/deployment-udr.yaml
+++ b/5g-control-plane/templates/deployment-udr.yaml
@@ -33,8 +33,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-udr-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup udr; do echo waiting for udr; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "udr" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-control-plane/templates/deployment-webui.yaml b/5g-control-plane/templates/deployment-webui.yaml
index 142b9ff..99c44e8 100644
--- a/5g-control-plane/templates/deployment-webui.yaml
+++ b/5g-control-plane/templates/deployment-webui.yaml
@@ -32,8 +32,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-webui-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup webui; do echo waiting for webui; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "webui" . | include "5g-control-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-ran-sim/Chart.yaml b/5g-ran-sim/Chart.yaml
index 83259f8..c07417d 100644
--- a/5g-ran-sim/Chart.yaml
+++ b/5g-ran-sim/Chart.yaml
@@ -8,4 +8,4 @@
 name: 5g-ran-sim
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.5.7
+version: 0.5.8
diff --git a/5g-ran-sim/templates/configmap-gnbsim.yaml b/5g-ran-sim/templates/configmap-gnbsim.yaml
index b85fb06..75e0755 100644
--- a/5g-ran-sim/templates/configmap-gnbsim.yaml
+++ b/5g-ran-sim/templates/configmap-gnbsim.yaml
@@ -10,6 +10,10 @@
 {{- $gnbconf := index .Values.config.gnbsim.yamlCfgFiles "gnb.conf" }}
 {{- $configuration := index $gnbconf "configuration" }}
 
+{{- if not (hasKey $configuration "goProfile") -}}
+{{- $_ := dict "enable" .Values.config.gnbsim.goProfile.enable "port" .Values.config.gnbsim.goProfile.port | set $configuration "goProfile" -}}
+{{- end }}
+
 {{- if not (hasKey $configuration "httpServer") -}}
 {{- $_ := dict "enable" .Values.config.gnbsim.httpServer.enable "ipAddr" .Values.config.gnbsim.httpServer.ipAddr "port" .Values.config.gnbsim.httpServer.port | set $configuration "httpServer" -}}
 {{- end }}
diff --git a/5g-ran-sim/templates/service-gnbsim.yaml b/5g-ran-sim/templates/service-gnbsim.yaml
index 65974e0..8e74f0f 100644
--- a/5g-ran-sim/templates/service-gnbsim.yaml
+++ b/5g-ran-sim/templates/service-gnbsim.yaml
@@ -23,9 +23,9 @@
   - name: http-api
     port: {{ .Values.config.gnbsim.httpServer.port }}
     protocol: TCP
-{{- if .Values.config.gnbsim.profile.enable }}
+{{- if .Values.config.gnbsim.goProfile.enable }}
   - name: profile-http
-    port: {{ .Values.config.gnbsim.profile.port }}
+    port: {{ .Values.config.gnbsim.goProfile.port }}
     protocol: TCP
 {{- end }}
 {{- end }}
diff --git a/5g-ran-sim/templates/statefulset-gnbsim.yaml b/5g-ran-sim/templates/statefulset-gnbsim.yaml
index f003d64..7b4e371 100644
--- a/5g-ran-sim/templates/statefulset-gnbsim.yaml
+++ b/5g-ran-sim/templates/statefulset-gnbsim.yaml
@@ -47,8 +47,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-amf-module
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup amf; do echo waiting for nrf; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "gnbsim" . | include "5g-ransim-plane.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/5g-ran-sim/values.yaml b/5g-ran-sim/values.yaml
index 9ab30da..9de4ca3 100644
--- a/5g-ran-sim/values.yaml
+++ b/5g-ran-sim/values.yaml
@@ -6,7 +6,7 @@
   repository: "" #default docker hub
   tags:
     init: omecproject/pod-init:1.0.0
-    gnbsim: omecproject/5gc-gnbsim:main-d2e5b8c
+    gnbsim: omecproject/5gc-gnbsim:main-cd26209
   pullPolicy: IfNotPresent
 
 nodeSelectors:
@@ -50,7 +50,7 @@
       enable: false
       ipAddr: "POD_IP"
       port: 6000
-    profile:
+    goProfile:
       enable: true
       port: 5000
     ngapp:
diff --git a/omec-sub-provision/Chart.yaml b/omec-sub-provision/Chart.yaml
index 0140bee..450e286 100644
--- a/omec-sub-provision/Chart.yaml
+++ b/omec-sub-provision/Chart.yaml
@@ -8,4 +8,4 @@
 name: omec-sub-provision
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.5.2
+version: 0.5.3
diff --git a/omec-sub-provision/templates/deployment-simapp.yaml b/omec-sub-provision/templates/deployment-simapp.yaml
index 08bc336..87911bd 100644
--- a/omec-sub-provision/templates/deployment-simapp.yaml
+++ b/omec-sub-provision/templates/deployment-simapp.yaml
@@ -35,8 +35,12 @@
       imagePullSecrets:
 {{ toYaml .Values.images.pullSecrets | indent 8 }}
     {{- end }}
-    {{- if .Values.config.coreDump.enabled }}
       initContainers:
+      - name: wait-simapp-module2
+        image: {{ .Values.images.repository }}{{ .Values.images.tags.init }}
+        imagePullPolicy: {{ .Values.images.pullPolicy }}
+        command: ['sh', '-c', 'until nslookup simapp; do echo waiting for simapp; sleep 4; done;']
+    {{- if .Values.config.coreDump.enabled }}
     {{ tuple "simapp" . | include "omec-sub-provision.coredump_init" | indent 6 }}
     {{- end }}
       containers:
diff --git a/omec-sub-provision/values.yaml b/omec-sub-provision/values.yaml
index 53156d9..478261b 100644
--- a/omec-sub-provision/values.yaml
+++ b/omec-sub-provision/values.yaml
@@ -6,7 +6,7 @@
   repository: "" #default docker hub
   tags:
     init: omecproject/pod-init:1.0.0
-    simapp: omecproject/simapp:main-9545c5e
+    simapp: omecproject/simapp:main-a4f741a
   pullPolicy: IfNotPresent
 
 resources: