checking sdcore or free5gc directory exist in a image
tested these changes on aiab setup with all sdcore images/free5gc images.
All pods are up and running, registration call flow is fine with gnbsim
Change-Id: I8a0fdab559cf3cb524cf159ae1d7b201acfd05f3
diff --git a/5g-control-plane/Chart.yaml b/5g-control-plane/Chart.yaml
index 78d073f..e39864f 100644
--- a/5g-control-plane/Chart.yaml
+++ b/5g-control-plane/Chart.yaml
@@ -8,7 +8,7 @@
name: 5g-control-plane
icon: https://guide.opencord.org/logos/cord.svg
-version: 0.6.3
+version: 0.6.4
dependencies:
- name: mongodb
diff --git a/5g-control-plane/templates/bin/_amf-run.sh.tpl b/5g-control-plane/templates/bin/_amf-run.sh.tpl
index ce0d310..cdc0377 100644
--- a/5g-control-plane/templates/bin/_amf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_amf-run.sh.tpl
@@ -6,12 +6,21 @@
set -xe
-IMGPATH={{ .Values.config.imagePath }}
+DIR=""
+if [ -d "/free5gc/amf" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/amf" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp $IMGPATH/amf/amf /tmp/coredump/
+cp $DIR/amf/amf /tmp/coredump/
{{- end }}
-cd $IMGPATH
+cd $DIR
cat config/amfcfg.conf
GOTRACEBACK=crash ./amf/amf -amfcfg config/amfcfg.conf
diff --git a/5g-control-plane/templates/bin/_ausf-run.sh.tpl b/5g-control-plane/templates/bin/_ausf-run.sh.tpl
index 0307aed..ec0c519 100644
--- a/5g-control-plane/templates/bin/_ausf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_ausf-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/ausf" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/ausf" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/ausf/ausf /tmp/coredump/
+cp $DIR/ausf/ausf /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/ausfcfg.conf
GOTRACEBACK=crash ./ausf/ausf -ausfcfg config/ausfcfg.conf
diff --git a/5g-control-plane/templates/bin/_nrf-run.sh.tpl b/5g-control-plane/templates/bin/_nrf-run.sh.tpl
index 7caa2e9..97c4402 100644
--- a/5g-control-plane/templates/bin/_nrf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_nrf-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/nrf" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/nrf" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/nrf/nrf /tmp/coredump/
+cp $DIR/nrf/nrf /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/nrfcfg.conf
diff --git a/5g-control-plane/templates/bin/_nssf-run.sh.tpl b/5g-control-plane/templates/bin/_nssf-run.sh.tpl
index 2aae4a0..a903d75 100644
--- a/5g-control-plane/templates/bin/_nssf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_nssf-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/nssf" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/nssf" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/nssf/nssf /tmp/coredump/
+cp $DIR/nssf/nssf /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/nssfcfg.conf
diff --git a/5g-control-plane/templates/bin/_pcf-run.sh.tpl b/5g-control-plane/templates/bin/_pcf-run.sh.tpl
index 9dfee3f..1c6f554 100644
--- a/5g-control-plane/templates/bin/_pcf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_pcf-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/pcf" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/pcf" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/pcf/pcf /tmp/coredump/
+cp $DIR/pcf/pcf /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/pcfcfg.conf
diff --git a/5g-control-plane/templates/bin/_smf-run.sh.tpl b/5g-control-plane/templates/bin/_smf-run.sh.tpl
index aafc97c..8280a07 100644
--- a/5g-control-plane/templates/bin/_smf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_smf-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/smf" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/smf" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/smf/smf /tmp/coredump/
+cp $DIR/smf/smf /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/smfcfg.conf
cat uerouting/uerouting.conf
diff --git a/5g-control-plane/templates/bin/_udm-run.sh.tpl b/5g-control-plane/templates/bin/_udm-run.sh.tpl
index a171cea..dbc92d8 100644
--- a/5g-control-plane/templates/bin/_udm-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_udm-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/udm" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/udm" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/udm/udm /tmp/coredump/
+cp $DIR/udm/udm /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/udmcfg.conf
diff --git a/5g-control-plane/templates/bin/_udr-run.sh.tpl b/5g-control-plane/templates/bin/_udr-run.sh.tpl
index 900f72a..7dca3e0 100644
--- a/5g-control-plane/templates/bin/_udr-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_udr-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/udr" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/udr" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/udr/udr /tmp/coredump/
+cp $DIR/udr/udr /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/udrcfg.conf
diff --git a/5g-control-plane/templates/bin/_webui-run.sh.tpl b/5g-control-plane/templates/bin/_webui-run.sh.tpl
index 5e91d50..522a0e0 100644
--- a/5g-control-plane/templates/bin/_webui-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_webui-run.sh.tpl
@@ -6,11 +6,21 @@
set -xe
+DIR=""
+if [ -d "/free5gc/webconsole" ]; then
+ DIR="/free5gc"
+ echo "free5gc directory exist"
+fi
+if [ -d "/sdcore/webconsole" ]; then
+ DIR="/sdcore"
+ echo "sdcore directory exist"
+fi
+
{{- if .Values.config.coreDump.enabled }}
-cp /free5gc/webconsole/webconsole /tmp/coredump/
+cp $DIR/webconsole/webconsole /tmp/coredump/
{{- end }}
-cd /free5gc
+cd $DIR
cat config/webuicfg.conf
diff --git a/5g-control-plane/templates/deployment-amf.yaml b/5g-control-plane/templates/deployment-amf.yaml
index a6e7cc5..eeecdc5 100644
--- a/5g-control-plane/templates/deployment-amf.yaml
+++ b/5g-control-plane/templates/deployment-amf.yaml
@@ -33,10 +33,10 @@
{{ toYaml .Values.images.pullSecrets | indent 8 }}
{{- end }}
initContainers:
- - name: wait-nrf-module
+ - name: wait-amf-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;']
+ command: ['sh', '-c', 'until nslookup amf; do echo waiting for amf; sleep 4; done;']
{{- if .Values.config.coreDump.enabled }}
{{ tuple "amf" . | include "5g-control-plane.coredump_init" | indent 6 }}
{{- end }}
@@ -50,7 +50,7 @@
{{- end }}
stdin: true
tty: true
- command: [ {{ .Values.config.imagePath }}/script/amf-run.sh ]
+ command: ["/free5gc/script/amf-run.sh", "/sdcore/script/amf-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -73,21 +73,34 @@
{{ toYaml .Values.resources.amf | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
- mountPath: {{ .Values.config.imagePath }}/script/amf-run.sh
+ - name: run-script-tmp
+ mountPath: /free5gc/script/amf-run.sh
subPath: amf-run.sh
- - name: amf-config
- mountPath: {{ .Values.config.imagePath }}/config
+ - name: nf-config-tmp
+ mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/amf-run.sh
+ subPath: amf-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: amf
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: amf
+ defaultMode: 493
- name: run-script
configMap:
name: amf
defaultMode: 493
- - name: amf-config
+ - name: nf-config
configMap:
name: amf
defaultMode: 493
diff --git a/5g-control-plane/templates/deployment-ausf.yaml b/5g-control-plane/templates/deployment-ausf.yaml
index 295e198..05beb20 100644
--- a/5g-control-plane/templates/deployment-ausf.yaml
+++ b/5g-control-plane/templates/deployment-ausf.yaml
@@ -53,7 +53,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/ausf-run.sh"]
+ command: ["/free5gc/script/ausf-run.sh", "/sdcore/script/ausf-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -76,16 +76,29 @@
{{ toYaml .Values.resources.ausf | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/ausf-run.sh
subPath: ausf-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/ausf-run.sh
+ subPath: ausf-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: ausf
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: ausf
+ defaultMode: 493
- name: run-script
configMap:
name: ausf
diff --git a/5g-control-plane/templates/deployment-nrf.yaml b/5g-control-plane/templates/deployment-nrf.yaml
index 80075f8..78a2d7f 100644
--- a/5g-control-plane/templates/deployment-nrf.yaml
+++ b/5g-control-plane/templates/deployment-nrf.yaml
@@ -49,7 +49,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/nrf-run.sh"]
+ command: ["/free5gc/script/nrf-run.sh", "/sdcore/script/nrf-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -72,16 +72,29 @@
{{ toYaml .Values.resources.nrf | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/nrf-run.sh
subPath: nrf-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/nrf-run.sh
+ subPath: nrf-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: nrf
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: nrf
+ defaultMode: 493
- name: run-script
configMap:
name: nrf
diff --git a/5g-control-plane/templates/deployment-nssf.yaml b/5g-control-plane/templates/deployment-nssf.yaml
index 2cce254..67e7973 100644
--- a/5g-control-plane/templates/deployment-nssf.yaml
+++ b/5g-control-plane/templates/deployment-nssf.yaml
@@ -51,7 +51,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/nssf-run.sh"]
+ command: ["/free5gc/script/nssf-run.sh", "/sdcore/script/nssf-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -74,16 +74,29 @@
{{ toYaml .Values.resources.nssf | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/nssf-run.sh
subPath: nssf-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/nssf-run.sh
+ subPath: nssf-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: nssf
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: nssf
+ defaultMode: 493
- name: run-script
configMap:
name: nssf
diff --git a/5g-control-plane/templates/deployment-pcf.yaml b/5g-control-plane/templates/deployment-pcf.yaml
index 6829ffe..cba34b7 100644
--- a/5g-control-plane/templates/deployment-pcf.yaml
+++ b/5g-control-plane/templates/deployment-pcf.yaml
@@ -51,7 +51,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/pcf-run.sh"]
+ command: ["/free5gc/script/pcf-run.sh", "/sdcore/script/pcf-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -74,16 +74,29 @@
{{ toYaml .Values.resources.pcf | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/pcf-run.sh
subPath: pcf-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/pcf-run.sh
+ subPath: pcf-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: pcf
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: pcf
+ defaultMode: 493
- name: run-script
configMap:
name: pcf
diff --git a/5g-control-plane/templates/deployment-smf.yaml b/5g-control-plane/templates/deployment-smf.yaml
index 296bc50..d707658 100644
--- a/5g-control-plane/templates/deployment-smf.yaml
+++ b/5g-control-plane/templates/deployment-smf.yaml
@@ -53,7 +53,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/smf-run.sh"]
+ command: ["/free5gc/script/smf-run.sh", "/sdcore/script/smf-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -76,18 +76,33 @@
{{ toYaml .Values.resources.smf | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/smf-run.sh
subPath: smf-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/uerouting
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/smf-run.sh
+ subPath: smf-run.sh
+ - name: nf-config
+ mountPath: /sdcore/uerouting
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: smf
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: smf
+ defaultMode: 493
- name: run-script
configMap:
name: smf
diff --git a/5g-control-plane/templates/deployment-udm.yaml b/5g-control-plane/templates/deployment-udm.yaml
index 2714ef0..962f0ff 100644
--- a/5g-control-plane/templates/deployment-udm.yaml
+++ b/5g-control-plane/templates/deployment-udm.yaml
@@ -55,7 +55,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/udm-run.sh"]
+ command: ["/free5gc/script/udm-run.sh", "/sdcore/script/udm-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -78,16 +78,29 @@
{{ toYaml .Values.resources.udm | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/udm-run.sh
subPath: udm-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/udm-run.sh
+ subPath: udm-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: udm
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: udm
+ defaultMode: 493
- name: run-script
configMap:
name: udm
diff --git a/5g-control-plane/templates/deployment-udr.yaml b/5g-control-plane/templates/deployment-udr.yaml
index abe6e64..1343106 100644
--- a/5g-control-plane/templates/deployment-udr.yaml
+++ b/5g-control-plane/templates/deployment-udr.yaml
@@ -51,7 +51,7 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/udr-run.sh"]
+ command: ["/free5gc/script/udr-run.sh", "/sdcore/script/udr-run.sh"]
env:
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: {{ .Values.config.grpc.golog_verbosity | quote }}
@@ -74,16 +74,29 @@
{{ toYaml .Values.resources.udr | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/udr-run.sh
subPath: udr-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/udr-run.sh
+ subPath: udr-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: udr
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: udr
+ defaultMode: 493
- name: run-script
configMap:
name: udr
diff --git a/5g-control-plane/templates/deployment-webui.yaml b/5g-control-plane/templates/deployment-webui.yaml
index c71becb..d3a2527 100644
--- a/5g-control-plane/templates/deployment-webui.yaml
+++ b/5g-control-plane/templates/deployment-webui.yaml
@@ -61,22 +61,35 @@
{{- end }}
stdin: true
tty: true
- command: ["/free5gc/script/webui-run.sh"]
+ command: ["/free5gc/script/webui-run.sh", "/sdcore/script/webui-run.sh"]
{{- if .Values.resources.enabled }}
resources:
{{ toYaml .Values.resources.webui | indent 10 }}
{{- end }}
volumeMounts:
- - name: run-script
+ - name: run-script-tmp
mountPath: /free5gc/script/webui-run.sh
subPath: webui-run.sh
- - name: nf-config
+ - name: nf-config-tmp
mountPath: /free5gc/config
+ - name: run-script
+ mountPath: /sdcore/script/webui-run.sh
+ subPath: webui-run.sh
+ - name: nf-config
+ mountPath: /sdcore/config
{{- if .Values.config.coreDump.enabled }}
- name: coredump
mountPath: /tmp/coredump
{{- end }}
volumes:
+ - name: run-script-tmp
+ configMap:
+ name: webui
+ defaultMode: 493
+ - name: nf-config-tmp
+ configMap:
+ name: webui
+ defaultMode: 493
- name: run-script
configMap:
name: webui