Adding GIZMO chart to AAI
[oom.git] / kubernetes / aai / templates / data-router-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
15 #{{ if not .Values.disableAaiDataRouter }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: aai-data-router
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.dataRouterReplicas }}
23   selector:
24     matchLabels:
25       app: aai-data-router
26   template:
27     metadata:
28       labels:
29         app: aai-data-router
30       name: aai-data-router
31     spec:
32       initContainers:
33       - command:
34         - /bin/sh
35         - -c
36         - |
37           mkdir -p /logroot/data-router/logs
38           chmod -R 777 /logroot/data-router/logs
39           chown -R root:root /logroot
40         env:
41         - name: NAMESPACE
42           valueFrom:
43             fieldRef:
44               apiVersion: v1
45               fieldPath: metadata.namespace
46         securityContext:
47           privileged: true
48         image: {{ .Values.image.es_bb }}
49         imagePullPolicy: {{ .Values.pullPolicy }}
50         name: init-sysctl
51         volumeMounts:
52         - name: aai-data-router-logs
53           mountPath: /logroot/
54       containers:
55       - name: aai-data-router
56         image: "{{ .Values.image.dataRouterImage }}:{{ .Values.image.dataRouterVersion }}"
57         imagePullPolicy: {{ .Values.pullPolicy }}
58         env:
59         - name: SERVICE_BEANS
60           value: /opt/app/data-router/dynamic/conf
61         - name: CONFIG_HOME
62           value: /opt/app/data-router/config/
63         - name: KEY_STORE_PASSWORD
64           value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
65         - name: DYNAMIC_ROUTES
66           value: /opt/app/data-router/dynamic/routes
67         - name: KEY_MANAGER_PASSWORD
68           value: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
69         - name: PATH
70           value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
71         - name: JAVA_HOME
72           value: usr/lib/jvm/java-8-openjdk-amd64
73         volumeMounts:
74         - mountPath: /etc/localtime
75           name: localtime
76           readOnly: true
77         - mountPath: /opt/app/data-router/config/model/aai_oxm_v8.xml
78           subPath: aai_oxm_v8.xml
79           name: aai-data-router-model-v8
80         - mountPath: /opt/app/data-router/config/model/aai_oxm_v9.xml
81           subPath: aai_oxm_v9.xml
82           name: aai-data-router-model-v9
83         - mountPath: /opt/app/data-router/config/model/aai_oxm_v10.xml
84           subPath: aai_oxm_v10.xml
85           name: aai-data-router-model-v10
86         - mountPath: /opt/app/data-router/config/model/aai_oxm_v11.xml
87           subPath: aai_oxm_v11.xml
88           name: aai-data-router-model-v11
89         - mountPath:  /opt/app/data-router/config/auth
90           name: aai-data-router-auth
91         - mountPath:  /opt/app/data-router/config/data-router.properties
92           name: aai-data-router-properties
93           subPath: data-router.properties
94         - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route
95           subPath: entity-event.route
96           name: aai-data-router-dynamic-route
97         - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
98           subPath: entity-event-policy.xml
99           name: aai-data-router-dynamic-policy
100         - mountPath: /logs/
101           name: aai-data-router-logs
102         ports:
103         - containerPort: 9502
104         readinessProbe:
105           tcpSocket:
106             port: 9502
107           initialDelaySeconds: 5
108           periodSeconds: 10
109       volumes:
110       - name: localtime
111         hostPath:
112           path: /etc/localtime
113       - name: aai-data-router-model-v8
114         configMap:
115           name: aai-data-router-model-v8-configmap
116       - name: aai-data-router-model-v9
117         configMap:
118           name: aai-data-router-model-v9-configmap
119       - name: aai-data-router-model-v10
120         configMap:
121           name: aai-data-router-model-v10-configmap
122       - name: aai-data-router-model-v11
123         configMap:
124           name: aai-data-router-model-v11-configmap
125       - name: aai-data-router-auth
126         secret:
127           secretName: aai-data-router-secret
128       - name: aai-data-router-properties
129         configMap:
130           name: aai-data-router-prop-configmap
131       - name: aai-data-router-dynamic-route
132         configMap:
133           name: aai-data-router-dynamic-configmap
134       - name: aai-data-router-dynamic-policy
135         configMap:
136           name: aai-data-router-dynamic-configmap
137       - name: aai-data-router-logs
138         hostPath:
139           path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/aai/data-router/logs
140       restartPolicy: Always
141       imagePullSecrets:
142       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
143 #{{ end }}
144