a0c13802bb33b5ee108f66efd3ed33fd70c9a5a5
[oom.git] / kubernetes / message-router / templates / message-router-dmaap.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
15 #{{ if not .Values.disableMessageRouterDmaap }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: message-router-dmaap
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.dmaapReplicas }}
23   selector:
24     matchLabels:
25       app: dmaap
26   template:
27     metadata:
28       labels:
29         app: dmaap
30       name: message-router-dmaap
31     spec:
32       initContainers:
33       - command:
34         - /root/ready.py
35         args:
36         - --container-name
37         - global-kafka
38         - --container-name
39         - zookeeper
40         env:
41         - name: NAMESPACE
42           valueFrom:
43             fieldRef:
44               apiVersion: v1
45               fieldPath: metadata.namespace
46         image: {{ .Values.image.readiness }}
47         imagePullPolicy: {{ .Values.pullPolicy }}
48         name: dmaap-readiness
49       containers:
50       - image: {{ .Values.image.dmaap }}
51         imagePullPolicy: {{ .Values.pullPolicy }}
52         name: dmaap
53         ports:
54         - containerPort: 3904
55         - containerPort: 3905
56         readinessProbe:
57           tcpSocket:
58             port: 3904
59           initialDelaySeconds: 5
60           periodSeconds: 10
61         volumeMounts:
62         - mountPath: /etc/localtime
63           name: localtime
64           readOnly: true
65         - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
66           subPath: MsgRtrApi.properties
67           name: appprops
68         - mountPath: /appl/dmaapMR1/etc/cadi.properties
69           subPath: cadi.properties
70           name: cadi
71         - mountPath: /appl/dmaapMR1/etc/keyfile
72           subPath: mykey
73           name: mykey
74       restartPolicy: Always
75       volumes:
76       - name: localtime
77         hostPath:
78           path: /etc/localtime
79       - name: appprops
80         configMap:
81           name: mr-dmaap-msgrtrapi-prop-configmap
82       - name: cadi
83         configMap:
84           name: mr-dmaap-cadi-prop-configmap
85       - name: mykey
86         configMap:
87           name: mr-dmaap-mykey-configmap
88       imagePullSecrets:
89       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
90 {{ end }}
91