Fix A1 healthcheck path
[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/ricmanifest.json
53             subPath: ricmanifest.json
54           - name: a1conf
55             mountPath: /opt/rmr_string_int_mapping.txt
56             subPath: rmr_string_int_mapping.txt
57           - name: a1conf
58             mountPath: /opt/route/local.rt
59             subPath: local.rt
60           envFrom:
61             - configMapRef:
62                 name: {{ include "common.configmapname.a1mediator" . }}-env
63           image: {{ include "common.repository" . }}/{{ .Values.a1mediator.image.name }}:{{ .Values.a1mediator.image.tag }}
64           imagePullPolicy: {{ include "common.pullPolicy" . }}
65           ports:
66             - name: http
67               containerPort: {{ include "common.serviceport.a1mediator.http" . }}
68               protocol: TCP
69             - name: rmrroute
70               containerPort: {{ include "common.serviceport.a1mediator.rmr.route" . }}
71               protocol: TCP
72             - name: rmrdata
73               containerPort: {{ include "common.serviceport.a1mediator.rmr.data" . }}
74               protocol: TCP
75           livenessProbe:
76             httpGet:
77               path: /a1-p/healthcheck
78               port: http
79           readinessProbe:
80             httpGet:
81               path: /a1-p/healthcheck
82               port: http
83       volumes:
84         - name: "a1conf"
85           configMap:
86             name:  {{ include "common.configmapname.a1mediator" . }}-a1conf