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