X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=xapp_onboarder%2Fxapp_onboarder%2Fresources%2Fxapp-std%2Ftemplates%2Fdeployment.yaml;h=defb6b408596b9b54e114e387bf0bd62bffbb22b;hb=cd4b9aaa9aa6f3f0bfef09c4808315f10a385310;hp=48be8c5367d56d2d75b79facb0c73f4b5e96bbd7;hpb=3b56acc14a2308e853612e22738cd44687288149;p=it%2Fdev.git diff --git a/xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/deployment.yaml b/xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/deployment.yaml index 48be8c5..defb6b4 100644 --- a/xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/deployment.yaml +++ b/xapp_onboarder/xapp_onboarder/resources/xapp-std/templates/deployment.yaml @@ -44,31 +44,29 @@ spec: configMap: name: {{ include "ricxapp.configmapname" . }}-appconfig containers: -{{- range .Values.containers }} - - name: {{ .name }} - image: "{{ .image.registry }}/{{ .image.name }}:{{ .image.tag }}" - {{- if .command }} - command: [{{ .command }}] +{{- $containers := .Values.containers }} +{{- $ports := .Values.messaging.ports }} +{{- range $container := $containers }} + {{- $portlist := list }} + {{- range $port := $ports }} + {{- if eq $port.container $container.name }} + {{- $portlist = append $portlist $port }} + {{- end }} + {{- end }} + - name: {{ $container.name }} + image: "{{ $container.image.registry }}/{{ $container.image.name }}:{{ $container.image.tag }}" + {{- if $container.command }} + command: [{{ $container.command }}] {{- end}} imagePullPolicy: {{ $.Values.image_pull_policy }} - {{- if .ports }} + {{- if $portlist }} ports: - {{- if .ports.http }} - - name: http_{{ .name }} - containerPort: {{ .ports.http }} - protocol: TCP - {{- end }} - {{- if .ports.rmr_data }} - - name: rmrdata_{{ .name }} - containerPort: {{ .ports.rmr_data }} + {{- range $port := $portlist }} + - name: {{ $port.name }} + containerPort: {{ $port.port }} protocol: TCP - {{- end }} - {{- if .ports.rmr_route }} - - name: rmrroute_{{ .name }} - containerPort: {{ .ports.rmr_route }} - protocol: TCP - {{- end }} - {{- end }} + {{- end }} + {{- end }} {{- end }} volumeMounts: - name: config-volume @@ -76,4 +74,6 @@ spec: envFrom: - configMapRef: name: {{ include "ricxapp.configmapname" . }}-appenv + - configMapRef: + name: dbaas-appconfig restartPolicy: Always