Update a1 container.
[it/dep.git] / ric-platform / 50-RIC-Platform / helm / a1mediator / templates / deployment.yaml
index 4eb0110..f14d4e2 100644 (file)
@@ -20,9 +20,9 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.deploymentname.a1mediator" . }}
-  namespace: {{ include "common.namespace" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
@@ -30,19 +30,23 @@ spec:
   replicas: {{ .Values.a1mediator.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
       release: {{ .Release.Name }}
   template:
     metadata:
+      {{- if .Values.a1mediator.annotations }}
+      annotations:
+        {{- .Values.a1mediator.annotations | nindent 8 -}}
+      {{ end }}
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.a1mediator" . }}
       imagePullSecrets:
         - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        - name: {{ include "common.containername.a1mediator" . }}
           volumeMounts:
           - name: a1conf
             mountPath: /opt/ricmanifest.json
@@ -53,31 +57,30 @@ spec:
           - name: a1conf
             mountPath: /opt/route/local.rt
             subPath: local.rt
-          env:
-          - name: PYTHONUNBUFFERED
-            value: "0"
-          - name: RMR_RCV_RETRY_INTERVAL
-            value: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_interval_ms }}"
-          - name: RMR_RETRY_TIMES
-            value: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_times }}"
+          envFrom:
+            - configMapRef:
+                name: {{ include "common.configmapname.a1mediator" . }}-env
           image: {{ include "common.repository" . }}/{{ .Values.a1mediator.image.name }}:{{ .Values.a1mediator.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           ports:
             - name: http
-              containerPort: {{ .Values.a1mediator.service.http.containerPort }}
+              containerPort: {{ include "common.serviceport.a1mediator.http" . }}
               protocol: TCP
-            - name: rmr
-              containerPort: {{ .Values.a1mediator.service.rmr.containerPort }}
+            - name: rmrroute
+              containerPort: {{ include "common.serviceport.a1mediator.rmr.route" . }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ include "common.serviceport.a1mediator.rmr.data" . }}
               protocol: TCP
           livenessProbe:
             httpGet:
-              path: /ui
+              path: /healthcheck
               port: http
           readinessProbe:
             httpGet:
-              path: /ui
+              path: /healthcheck
               port: http
       volumes:
         - name: "a1conf"
           configMap:
-            name:  {{ include "common.configmapname.a1mediator" . }}-a1conf
\ No newline at end of file
+            name:  {{ include "common.configmapname.a1mediator" . }}-a1conf