871742aa6f3e0a70a3568045c6357e0fbb04e3e2
[it/test.git] / ric_robot_suite / helm / ric-robot / templates / deployment.yaml
1 # Copyright © 2019 AT&T Intellectual Property. All rights reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 apiVersion: apps/v1
16 kind: Deployment
17 metadata:
18   name: {{ include "ric-robot.fullname" . }}
19   namespace: {{ .Release.Namespace }}
20   labels:
21     app: {{ include "ric-robot.name" . }}
22     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23     release: {{ .Release.Name }}
24     heritage: {{ .Release.Service }}
25 spec:
26   replicas: {{ .Values.replicaCount }}
27   selector:
28     matchLabels:
29       app: {{ include "ric-robot.name" . }}
30       release: {{ .Release.Name }}
31   template:
32     metadata:
33       {{- if .Values.rtmgr.annotations }}
34       annotations:
35         {{- .Values.rtmgr.annotations | nindent 8 -}}
36       {{ end }}
37       labels:
38         app: {{ include "ric-robot.name" . }}
39         release: {{ .Release.Name }}
40         robotImplementation: {{ .Values.robotImplementation }}
41     spec:
42       containers:
43       - name: {{ include "ric-robot.name" . }}
44         image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
45         imagePullPolicy: {{ .Values.image.pullPolicy }}
46         env:
47           - name: RICPLT_NAMESPACE
48             value:  {{ .Release.Namespace }}
49           - name: RICPLT_RELEASE_NAME
50             value:  {{ .Release.Name }}
51           - name: RICPLT_COMPONENTS
52             value: {{ keys .Values.ric.platform.components | join " " }}
53         ports:
54            - containerPort: {{ .Values.service.port }}
55         livenessProbe:
56           tcpSocket:
57             port: {{ .Values.service.port }}
58           initialDelaySeconds: 5
59           periodSeconds: 30
60         readinessProbe:
61           tcpSocket:
62             port: {{ .Values.service.port }}
63           initialDelaySeconds: 5
64           periodSeconds: 30
65         volumeMounts:
66         - name: dshm
67           mountPath: /dev/shm
68         - name: localtime
69           mountPath: /etc/localtime
70           readOnly: true
71         - name: robot-eteshare
72           mountPath: /share/config
73         - name: robot-logs
74           mountPath: /share/logs
75         resources:
76       volumes:
77       - name: dshm
78         emptyDir:
79           medium: Memory
80       - name: localtime
81         hostPath:
82           path: /etc/localtime
83       - name: robot-eteshare
84         configMap:
85           name: {{ include "ric-robot.fullname" . }}-eteshare-configmap
86           defaultMode: 0755
87       - name: robot-logs
88         emptyDir: {}
89       imagePullSecrets:
90         - name: {{ .Values.image.repositoryCred }}
91