Extend K8S and RIC installation instructions
[it/dep.git] / ric-platform / 50-RIC-Platform / helm / a1mediator / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #   Copyright (c) 2019 Nokia.                                                  #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17
18 ---
19 apiVersion: apps/v1
20 kind: Deployment
21 metadata:
22   name: {{ include "common.deploymentname.a1mediator" . }}
23   namespace: {{ include "common.namespace.platform" . }}
24   labels:
25     app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
26     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27     release: {{ .Release.Name }}
28     heritage: {{ .Release.Service }}
29 spec:
30   replicas: {{ .Values.a1mediator.replicaCount }}
31   selector:
32     matchLabels:
33       app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
34       release: {{ .Release.Name }}
35   template:
36     metadata:
37       {{- if .Values.a1mediator.annotations }}
38       annotations:
39         {{- .Values.a1mediator.annotations | nindent 8 -}}
40       {{ end }}
41       labels:
42         app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }}
43         release: {{ .Release.Name }}
44     spec:
45       hostname: {{ include "common.name.a1mediator" . }}
46       imagePullSecrets:
47         - name: {{ include "common.repositoryCred" . }}
48       containers:
49         - name: {{ include "common.containername.a1mediator" . }}
50           volumeMounts:
51           - name: a1conf
52             mountPath: /opt/route/local.rt
53             subPath: local.rt
54           envFrom:
55             - configMapRef:
56                 name: {{ include "common.configmapname.a1mediator" . }}-env
57           image: {{ include "common.repository" . }}/{{ .Values.a1mediator.image.name }}:{{ .Values.a1mediator.image.tag }}
58           imagePullPolicy: {{ include "common.pullPolicy" . }}
59           ports:
60             - name: http
61               containerPort: {{ include "common.serviceport.a1mediator.http" . }}
62               protocol: TCP
63             - name: rmrroute
64               containerPort: {{ include "common.serviceport.a1mediator.rmr.route" . }}
65               protocol: TCP
66             - name: rmrdata
67               containerPort: {{ include "common.serviceport.a1mediator.rmr.data" . }}
68               protocol: TCP
69           livenessProbe:
70             httpGet:
71               path: /a1-p/healthcheck
72               port: http
73           readinessProbe:
74             httpGet:
75               path: /a1-p/healthcheck
76               port: http
77       volumes:
78         - name: "a1conf"
79           configMap:
80             name:  {{ include "common.configmapname.a1mediator" . }}-a1conf