add annotation to webui and gnbsim run server
Change-Id: I04941bec282754f077ea6eb726872f0c7caf228c
diff --git a/5g-ran-sim/Chart.yaml b/5g-ran-sim/Chart.yaml
index c29348f..139c556 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.6.2
+version: 0.6.3
diff --git a/5g-ran-sim/templates/bin/_gnbsim-run.sh.tpl b/5g-ran-sim/templates/bin/_gnbsim-run.sh.tpl
index c4ed0b1..5546e1c 100644
--- a/5g-ran-sim/templates/bin/_gnbsim-run.sh.tpl
+++ b/5g-ran-sim/templates/bin/_gnbsim-run.sh.tpl
@@ -24,4 +24,9 @@
{{- end }}
{{- end }}
+{{- if .Values.config.gnbsim.httpServer.enable}}
+cd /gnbsim
+./bin/gnbsim --cfg ./config/gnb.conf
+{{- else }}
sleep infinity
+{{- end }}
diff --git a/5g-ran-sim/templates/service-gnbsim.yaml b/5g-ran-sim/templates/service-gnbsim.yaml
index 8e74f0f..4e03f28 100644
--- a/5g-ran-sim/templates/service-gnbsim.yaml
+++ b/5g-ran-sim/templates/service-gnbsim.yaml
@@ -12,6 +12,10 @@
name: gnbsim
labels:
{{ tuple "gnbsim" . | include "5g-ransim-plane.metadata_labels" | indent 4 }}
+{{- with .Values.config.gnbsim.serviceAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+{{- end }}
spec:
type: {{ .Values.config.gnbsim.serviceType }}
selector:
@@ -23,6 +27,9 @@
- name: http-api
port: {{ .Values.config.gnbsim.httpServer.port }}
protocol: TCP
+{{- if .Values.config.gnbsim.httpServer.nodePort.enabled }}
+ nodePort: {{ .Values.config.gnbsim.httpServer.nodePort.port }}
+{{- end }}
{{- if .Values.config.gnbsim.goProfile.enable }}
- name: profile-http
port: {{ .Values.config.gnbsim.goProfile.port }}
diff --git a/5g-ran-sim/templates/statefulset-gnbsim.yaml b/5g-ran-sim/templates/statefulset-gnbsim.yaml
index b6c4e6e..ce8dc85 100644
--- a/5g-ran-sim/templates/statefulset-gnbsim.yaml
+++ b/5g-ran-sim/templates/statefulset-gnbsim.yaml
@@ -48,11 +48,11 @@
{{ toYaml .Values.images.pullSecrets | indent 8 }}
{{- end }}
initContainers:
- {{- if .Values.config.gnbsim.nonStandalone }}
+ {{- if .Values.config.gnbsim.waitForAmf }}
- 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 amf; sleep 4; done;']
+ command: ['sh', '-c', 'until nslookup amf; do echo waiting for amf; sleep 4; done; sleep 20']
{{- end }}
{{- if .Values.config.coreDump.enabled }}
{{ tuple "gnbsim" . | include "5g-ransim-plane.coredump_init" | indent 6 }}
diff --git a/5g-ran-sim/values.yaml b/5g-ran-sim/values.yaml
index afd4534..c2fa77a 100644
--- a/5g-ran-sim/values.yaml
+++ b/5g-ran-sim/values.yaml
@@ -33,25 +33,30 @@
path: /tmp/coredump
gnbsim:
deploy: true
- nonStandalone: true
+ waitForAmf: true
serviceType: ClusterIP
+ # serviceAnnotations:
+ # external-dns.alpha.kubernetes.io/hostname: "gnbsim.tenant-site.company.com"
networkTopo:
- upfAddr: "192.168.252.3/32"
upfGw: "192.168.251.1"
sriov:
- enabled: disabled
+ enabled: false
resourceName: "intel.com/intel_sriov_vfio"
ipam: static
cniPlugin: macvlan # supported CNIs: sriov, macvlan, host-device
iface: data # master in macvlan or device in host-device
gnb:
- ips:
+ ips:
- '"192.168.251.5/24"' #user plane IP at gnb if 2 separate interface provided
- '"192.168.251.6/32"' #user plane IP at gnb if 2 separate interface provided
httpServer:
enable: false
ipAddr: "POD_IP"
port: 6000
+ nodePort:
+ enabled: false
+ port: 30091
goProfile:
enable: true
port: 5000