41751f34d7b3a73f6e4b6ae6b0276a180081b45c
[it/dep.git] / ric-aux / 80-Auxiliary-Functions / helm / ves / templates / ves-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
20 kind: Deployment
21 apiVersion: extensions/v1beta1
22 metadata:
23   name: {{ include "common.deploymentname.ves" . }}
24   generation: 1
25   labels:
26     app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
27     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
28     release: {{ .Release.Name }}
29     heritage: {{ .Release.Service }}
30   annotations:
31     deployment.kubernetes.io/revision: '1'
32 spec:
33   replicas: {{ .Values.ves.replicaCount }}
34   selector:
35     matchLabels:
36       app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
37       release: {{ .Release.Name }}
38   template:
39     metadata:
40       labels:
41         app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
42         release: {{ .Release.Name }}
43     spec:
44       hostname: {{ include "common.name.ves" . }}
45       volumes:
46       - name: component-log
47         emptyDir: {}
48       - name: dmaap-config-file
49         configMap:
50           name: {{ include "common.configmapname.ves" . }}
51       imagePullSecrets:
52       - name: onap-docker-registry-key
53       containers:
54       - name: {{ include "common.containername.ves" . }}
55         image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }}
56         imagePullPolicy: {{ include "common.pullPolicy" . }}
57         ports:
58         - containerPort: {{ include "common.serviceport.ves.http.container" . }}
59           protocol: TCP
60         - containerPort: {{ include "common.serviceport.ves.https.container" . }}
61           protocol: TCP
62         volumeMounts:
63         - name: component-log
64           mountPath: "/opt/app/VESCollector/logs/ecomp"
65         - name: dmaap-config-file
66           mountPath: "/opt/app/VESCollector/etc/DmaapConfig.json"
67           subPath: DMaapConfig.json
68         readinessProbe:
69           httpGet:
70             path: "/healthcheck"
71             port: {{ include "common.serviceport.ves.http.container" . }}
72             scheme: HTTP
73           initialDelaySeconds: 5
74           timeoutSeconds: 1
75           periodSeconds: 15
76           successThreshold: 1
77           failureThreshold: 1
78         terminationMessagePath: "/dev/termination-log"
79         terminationMessagePolicy: File
80       restartPolicy: Always