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