X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-platform%2F50-RIC-Platform%2Fhelm%2Fa1mediator%2Ftemplates%2Fdeployment.yaml;h=f14d4e21a5e90b4f7763c491caf0f64401ea404b;hb=refs%2Fchanges%2F75%2F675%2F2;hp=7669af8419cc4ee3ed05bd4c9bb16e5469881c42;hpb=431ae3c7eab922223215b52f2a347029eb95335b;p=it%2Fdep.git diff --git a/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml index 7669af84..f14d4e21 100644 --- a/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml @@ -1,25 +1,52 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +--- apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "a1mediator.fullname" . }} + name: {{ include "common.deploymentname.a1mediator" . }} + namespace: {{ include "common.namespace.platform" . }} labels: -{{ include "a1mediator.labels" . | indent 4 }} + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.a1mediator.replicaCount }} selector: matchLabels: - app.kubernetes.io/name: {{ include "a1mediator.name" . }} - app.kubernetes.io/instance: {{ .Release.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.kubernetes.io/name: {{ include "a1mediator.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }} + release: {{ .Release.Name }} spec: + 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 @@ -30,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.rmr_timeout_config.rcv_retry_interval_ms }}" - - name: RMR_RETRY_TIMES - value: "{{ .Values.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.httpservice.port }} + containerPort: {{ include "common.serviceport.a1mediator.http" . }} + protocol: TCP + - 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 - resources: - {{- toYaml .Values.resources | nindent 12 }} volumes: - name: "a1conf" configMap: - name: "a1conf" + name: {{ include "common.configmapname.a1mediator" . }}-a1conf