Set the docker version for CLI to beijing
[oom.git] / kubernetes / dmaap / charts / message-router / templates / deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
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 apiVersion: extensions/v1beta1
15 kind: Deployment
16 metadata:
17   name: {{ include "common.fullname" . }}
18   namespace: {{ include "common.namespace" . }}
19   labels:
20     app: {{ include "common.name" . }}
21     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
22     release: {{ .Release.Name }}
23     heritage: {{ .Release.Service }}
24 spec:
25   replicas: {{ .Values.replicaCount }}
26   template:
27     metadata:
28       labels:
29         app: {{ include "common.name" . }}
30         release: {{ .Release.Name }}
31     spec:
32       initContainers:
33       - command:
34         - /root/ready.py
35         args:
36         - --container-name
37         - {{ .Values.kafka.name }}
38         - --container-name
39         - {{ .Values.zookeeper.name }}
40         env:
41         - name: NAMESPACE
42           valueFrom:
43             fieldRef:
44               apiVersion: v1
45               fieldPath: metadata.namespace
46         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
47         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48         name: {{ include "common.name" . }}-readiness
49       containers:
50         - name: {{ include "common.name" . }}
51           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
52           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53           ports:
54           - containerPort: {{ .Values.service.externalPort }}
55           - containerPort: {{ .Values.service.externalPort2 }}
56           {{- if eq .Values.liveness.enabled true }}
57           livenessProbe:
58             tcpSocket:
59               port: {{ .Values.service.externalPort }}
60             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
61             periodSeconds: {{ .Values.liveness.periodSeconds }}
62           {{ end -}}
63           readinessProbe:
64             tcpSocket:
65               port: {{ .Values.service.externalPort }}
66             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
67             periodSeconds: {{ .Values.readiness.periodSeconds }}
68           volumeMounts:
69           - mountPath: /etc/localtime
70             name: localtime
71             readOnly: true
72           - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
73             subPath: MsgRtrApi.properties
74             name: appprops
75           - mountPath: /appl/dmaapMR1/etc/cadi.properties
76             subPath: cadi.properties
77             name: cadi
78           - mountPath: /appl/dmaapMR1/etc/keyfile
79             subPath: mykey
80             name: mykey
81       volumes:
82         - name: localtime
83           hostPath:
84             path: /etc/localtime
85         - name: appprops
86           configMap:
87             name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
88         - name: cadi
89           configMap:
90             name: {{ include "common.fullname" . }}-cadi-prop-configmap
91         - name: mykey
92           secret:
93             secretName: {{ include "common.fullname" . }}-secret
94       imagePullSecrets:
95       - name: "{{ include "common.namespace" . }}-docker-registry-key"