Kong as Ingress Controller
[it/dep.git] / ric-aux / 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: apps/v1
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: ves-config-mount
49         configMap:
50           name: {{ include "common.configmapname.ves" . }}
51       - name: ves-config-mount-properties
52         configMap:
53           name: {{ include "common.configmapname.ves" . }}-properties
54       imagePullSecrets:
55       - name: onap-docker-registry-key
56       containers:
57       - name: {{ include "common.containername.ves" . }}
58         image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }}
59         imagePullPolicy: {{ .Values.ves.imagePullPolicy }}
60         ports:
61         - containerPort: {{ include "common.serviceport.ves.http" . }}
62           protocol: TCP
63         - containerPort: {{ include "common.serviceport.ves.https" . }}
64           protocol: TCP
65         volumeMounts:
66         - name: component-log
67           mountPath: "/opt/app/VESCollector/logs/ecomp"
68         - name: ves-config-mount
69           mountPath: "/opt/app/VESCollector/etc/DmaapConfig.json"
70           subPath: DmaapConfig.json
71         - name: ves-config-mount-properties
72           mountPath: "/opt/app/VESCollector/etc/collector.properties"
73           subPath: collector.properties
74         readinessProbe:
75           httpGet:
76             path: "/healthcheck"
77             port: {{ include "common.serviceport.ves.http" . }}
78             scheme: HTTP
79           initialDelaySeconds: 5
80           timeoutSeconds: 1
81           periodSeconds: 15
82           successThreshold: 1
83           failureThreshold: 1
84         terminationMessagePath: "/dev/termination-log"
85         terminationMessagePolicy: File
86       restartPolicy: Always