6dea20e515d32c67f08d49c3f245ea3d5cf49c09
[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: extensions/v1beta1
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   template:
28     metadata:
29       labels:
30         app.kubernetes.io/instance: {{ .Release.Name }}
31         app.kubernetes.io/managed-by: {{ .Release.Service }}
32     spec:
33       containers:
34       - name: {{ include "ric-robot.name" . }}
35         image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
36         imagePullPolicy: {{ .Values.image.pullPolicy }}
37         env:
38           - name: RICPLT_NAMESPACE
39             value:  {{ .Release.Namespace }}
40           - name: RICPLT_RELEASE_NAME
41             value:  {{ .Values.Release.HelmReleaseName }}
42           - name: RICPLT_COMPONENTS
43             value: {{ keys .Values.ric.platform.components | join " " }}
44         ports:
45            - containerPort: {{ .Values.service.port }}
46         livenessProbe:
47           tcpSocket:
48             port: {{ .Values.service.port }}
49           initialDelaySeconds: 5
50           periodSeconds: 30
51         readinessProbe:
52           tcpSocket:
53             port: {{ .Values.service.port }}
54           initialDelaySeconds: 5
55           periodSeconds: 30
56         volumeMounts:
57         - name: dshm
58           mountPath: /dev/shm
59         - name: localtime
60           mountPath: /etc/localtime
61           readOnly: true
62         - name: robot-eteshare
63           mountPath: /share/config
64         - name: robot-logs
65           mountPath: /share/logs
66         resources:
67       volumes:
68       - name: dshm
69         emptyDir:
70           medium: Memory
71       - name: localtime
72         hostPath:
73           path: /etc/localtime
74       - name: robot-eteshare
75         configMap:
76           name: {{ include "ric-robot.fullname" . }}-eteshare-configmap
77           defaultMode: 0755
78       - name: robot-logs
79         emptyDir: {}
80       imagePullSecrets:
81         - name: {{ .Values.image.repositoryCred }}
82