diff --git a/Arm-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio b/Arm-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio index bd50bad..0af99b1 100644 --- a/Arm-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio +++ b/Arm-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio @@ -32,6 +32,7 @@ RUN apt-get update && \ netbase \ iptables \ net-tools \ + dnsutils \ pkg-config && \ apt-get clean && \ git clone -b v2.2.6 --recursive https://github.com/open5gs/open5gs && \ diff --git a/Arm-Architecture/templates/hss-deploy.yaml b/Arm-Architecture/templates/hss-deploy.yaml index 6367096..e9a4e30 100644 --- a/Arm-Architecture/templates/hss-deploy.yaml +++ b/Arm-Architecture/templates/hss-deploy.yaml @@ -26,7 +26,11 @@ spec: - name: hss image: "{{ .Values.open5gs.image.repository }}:{{ .Values.open5gs.image.tag }}" imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} - command: ["open5gs-hssd", "-c", "/open5gs/config-map/hss.yaml"] + command: ["/bin/sh", "-c"] + args: + - until nslookup s6a.mme.open5gs.service; do echo waiting for mme DNS record to be ready; done; + sleep 10; + open5gs-hssd -c /open5gs/config-map/hss.yaml volumeMounts: - name: open5gs-hss-config mountPath: /open5gs/config-map/hss.yaml diff --git a/Arm-Architecture/templates/mme-deploy.yaml b/Arm-Architecture/templates/mme-deploy.yaml index f413b46..4930fc5 100644 --- a/Arm-Architecture/templates/mme-deploy.yaml +++ b/Arm-Architecture/templates/mme-deploy.yaml @@ -27,7 +27,13 @@ spec: - name: mme image: "{{ .Values.open5gs.image.repository }}:{{ .Values.open5gs.image.tag }}" imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} - command: ["open5gs-mmed", "-c", "/open5gs/config-map/mme.yaml"] + command: ["/bin/sh", "-c"] + args: + - until nslookup s6a.hss.open5gs.service; do echo waiting for hss DNS record to be ready; done; + until nslookup s11.sgwc.open5gs.service; do echo waiting for sgwc DNS record to be ready; done; + until nslookup s5.smf.open5gs.service; do echo waiting for smf DNS record to be ready; done; + sleep 10; + open5gs-mmed -c /open5gs/config-map/mme.yaml volumeMounts: - name: open5gs-mme-config mountPath: /open5gs/config-map/mme.yaml diff --git a/Arm-Architecture/templates/pcrf-deploy.yaml b/Arm-Architecture/templates/pcrf-deploy.yaml index a30f9f9..3c8082b 100644 --- a/Arm-Architecture/templates/pcrf-deploy.yaml +++ b/Arm-Architecture/templates/pcrf-deploy.yaml @@ -27,7 +27,11 @@ spec: - name: pcrf image: "{{ .Values.open5gs.image.repository }}:{{ .Values.open5gs.image.tag }}" imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} - command: ["open5gs-pcrfd", "-c", "/open5gs/config-map/pcrf.yaml"] + command: ["/bin/sh", "-c"] + args: + - until nslookup s5.smf.open5gs.service; do echo waiting for smf DNS record to be ready; done; + sleep 10; + open5gs-pcrfd -c /open5gs/config-map/pcrf.yaml volumeMounts: - name: open5gs-pcrf-config mountPath: /open5gs/config-map/pcrf.yaml diff --git a/Arm-Architecture/templates/sgw-c-deploy.yaml b/Arm-Architecture/templates/sgw-c-deploy.yaml index fcc49da..2d2362b 100644 --- a/Arm-Architecture/templates/sgw-c-deploy.yaml +++ b/Arm-Architecture/templates/sgw-c-deploy.yaml @@ -29,7 +29,9 @@ spec: imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} command: ["/bin/sh", "-c"] args: - - open5gs-sgwcd -c /open5gs/config-map/sgwc.yaml; + - until nslookup sx.sgwu.open5gs.service; do echo waiting for sgwu DNS record to be ready; done; + sleep 10; + open5gs-sgwcd -c /open5gs/config-map/sgwc.yaml; volumeMounts: - name: open5gs-sgwc-config mountPath: /open5gs/config-map/sgwc.yaml diff --git a/Arm-Architecture/templates/smf-deploy.yaml b/Arm-Architecture/templates/smf-deploy.yaml index 3a73c7f..d293c41 100644 --- a/Arm-Architecture/templates/smf-deploy.yaml +++ b/Arm-Architecture/templates/smf-deploy.yaml @@ -29,7 +29,10 @@ spec: imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} command: ["/bin/sh", "-c"] args: - - open5gs-smfd -c /open5gs/config-map/smf.yaml; + - until nslookup gx.pcrf.open5gs.service; do echo waiting for pcrf DNS record to be ready; done; + until nslookup sx.upf.open5gs.service; do echo waiting for upf DNS record to be ready; done; + sleep 10; + open5gs-smfd -c /open5gs/config-map/smf.yaml; volumeMounts: - name: open5gs-smf-config mountPath: /open5gs/config-map/smf.yaml diff --git a/x86-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio b/x86-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio index 8d9cbc7..ec198ea 100644 --- a/x86-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio +++ b/x86-Architecture/Dockerfiles/open5gs-epc/open5gs-epc-aio @@ -32,6 +32,7 @@ RUN apt-get update && \ netbase \ net-tools \ iptables \ + dnsutils \ pkg-config && \ apt-get clean && \ git clone -b v2.2.6 --recursive https://github.com/open5gs/open5gs && \ diff --git a/x86-Architecture/templates/hss-deploy.yaml b/x86-Architecture/templates/hss-deploy.yaml index 6367096..e9a4e30 100644 --- a/x86-Architecture/templates/hss-deploy.yaml +++ b/x86-Architecture/templates/hss-deploy.yaml @@ -26,7 +26,11 @@ spec: - name: hss image: "{{ .Values.open5gs.image.repository }}:{{ .Values.open5gs.image.tag }}" imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} - command: ["open5gs-hssd", "-c", "/open5gs/config-map/hss.yaml"] + command: ["/bin/sh", "-c"] + args: + - until nslookup s6a.mme.open5gs.service; do echo waiting for mme DNS record to be ready; done; + sleep 10; + open5gs-hssd -c /open5gs/config-map/hss.yaml volumeMounts: - name: open5gs-hss-config mountPath: /open5gs/config-map/hss.yaml diff --git a/x86-Architecture/templates/mme-deploy.yaml b/x86-Architecture/templates/mme-deploy.yaml index f413b46..4930fc5 100644 --- a/x86-Architecture/templates/mme-deploy.yaml +++ b/x86-Architecture/templates/mme-deploy.yaml @@ -27,7 +27,13 @@ spec: - name: mme image: "{{ .Values.open5gs.image.repository }}:{{ .Values.open5gs.image.tag }}" imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} - command: ["open5gs-mmed", "-c", "/open5gs/config-map/mme.yaml"] + command: ["/bin/sh", "-c"] + args: + - until nslookup s6a.hss.open5gs.service; do echo waiting for hss DNS record to be ready; done; + until nslookup s11.sgwc.open5gs.service; do echo waiting for sgwc DNS record to be ready; done; + until nslookup s5.smf.open5gs.service; do echo waiting for smf DNS record to be ready; done; + sleep 10; + open5gs-mmed -c /open5gs/config-map/mme.yaml volumeMounts: - name: open5gs-mme-config mountPath: /open5gs/config-map/mme.yaml diff --git a/x86-Architecture/templates/pcrf-deploy.yaml b/x86-Architecture/templates/pcrf-deploy.yaml index a30f9f9..3c8082b 100644 --- a/x86-Architecture/templates/pcrf-deploy.yaml +++ b/x86-Architecture/templates/pcrf-deploy.yaml @@ -27,7 +27,11 @@ spec: - name: pcrf image: "{{ .Values.open5gs.image.repository }}:{{ .Values.open5gs.image.tag }}" imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} - command: ["open5gs-pcrfd", "-c", "/open5gs/config-map/pcrf.yaml"] + command: ["/bin/sh", "-c"] + args: + - until nslookup s5.smf.open5gs.service; do echo waiting for smf DNS record to be ready; done; + sleep 10; + open5gs-pcrfd -c /open5gs/config-map/pcrf.yaml volumeMounts: - name: open5gs-pcrf-config mountPath: /open5gs/config-map/pcrf.yaml diff --git a/x86-Architecture/templates/sgw-c-deploy.yaml b/x86-Architecture/templates/sgw-c-deploy.yaml index fcc49da..2d2362b 100644 --- a/x86-Architecture/templates/sgw-c-deploy.yaml +++ b/x86-Architecture/templates/sgw-c-deploy.yaml @@ -29,7 +29,9 @@ spec: imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} command: ["/bin/sh", "-c"] args: - - open5gs-sgwcd -c /open5gs/config-map/sgwc.yaml; + - until nslookup sx.sgwu.open5gs.service; do echo waiting for sgwu DNS record to be ready; done; + sleep 10; + open5gs-sgwcd -c /open5gs/config-map/sgwc.yaml; volumeMounts: - name: open5gs-sgwc-config mountPath: /open5gs/config-map/sgwc.yaml diff --git a/x86-Architecture/templates/smf-deploy.yaml b/x86-Architecture/templates/smf-deploy.yaml index 3a73c7f..fc5232f 100644 --- a/x86-Architecture/templates/smf-deploy.yaml +++ b/x86-Architecture/templates/smf-deploy.yaml @@ -29,7 +29,10 @@ spec: imagePullPolicy: {{ .Values.open5gs.image.pullPolicy }} command: ["/bin/sh", "-c"] args: - - open5gs-smfd -c /open5gs/config-map/smf.yaml; + - until nslookup gx.pcrf.open5gs.service; do echo waiting for pcrf DNS record to be ready; done; + until nslookup sx.upf.open5gs.service; do echo waiting for upf DNS record to be ready; done; + sleep 10; + open5gs-smfd -c /open5gs/config-map/smf.yaml; volumeMounts: - name: open5gs-smf-config mountPath: /open5gs/config-map/smf.yaml