blob: 79bcff33ebca3ae5e3c0c73ac50e5fad91993004 [file] [log] [blame]
kj9bf27312018-03-19 15:07:44 +02001# 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
15apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 selector:
28 matchLabels:
29 app: {{ include "common.name" . }}
30 template:
31 metadata:
32 labels:
33 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
35 name: {{ include "common.name" . }}
36 spec:
37 initContainers:
38 - command:
39 - /bin/sh
40 - -c
41 - |
42 mkdir -p /logroot/data-router/logs
43 chmod -R 777 /logroot/data-router/logs
44 chown -R root:root /logroot
45 env:
46 - name: NAMESPACE
47 valueFrom:
48 fieldRef:
49 apiVersion: v1
50 fieldPath: metadata.namespace
51 securityContext:
52 privileged: true
53 image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 name: init-sysctl
56 volumeMounts:
57 - name: {{ include "common.fullname" . }}-logs
58 mountPath: /logroot/
59 containers:
60 - name: {{ include "common.name" . }}
61 image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 env:
64 - name: SERVICE_BEANS
65 value: /opt/app/data-router/dynamic/conf
66 - name: CONFIG_HOME
67 value: /opt/app/data-router/config/
68 - name: KEY_STORE_PASSWORD
69 value: {{ .Values.config.keyStorePassword }}
70 - name: DYNAMIC_ROUTES
71 value: /opt/app/data-router/dynamic/routes
72 - name: KEY_MANAGER_PASSWORD
73 value: {{ .Values.config.keyManagerPassword }}
74 - name: PATH
75 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
76 - name: JAVA_HOME
77 value: usr/lib/jvm/java-8-openjdk-amd64
78 volumeMounts:
79 - mountPath: /etc/localtime
80 name: localtime
81 readOnly: true
82 - mountPath: /opt/app/data-router/config/model/aai_oxm_v8.xml
83 subPath: aai_oxm_v8.xml
84 name: {{ include "common.fullname" . }}-model-v8
85 - mountPath: /opt/app/data-router/config/model/aai_oxm_v9.xml
86 subPath: aai_oxm_v9.xml
87 name: {{ include "common.fullname" . }}-model-v9
88 - mountPath: /opt/app/data-router/config/model/aai_oxm_v10.xml
89 subPath: aai_oxm_v10.xml
90 name: {{ include "common.fullname" . }}-model-v10
91 - mountPath: /opt/app/data-router/config/model/aai_oxm_v11.xml
92 subPath: aai_oxm_v11.xml
93 name: {{ include "common.fullname" . }}-model-v11
94 - mountPath: /opt/app/data-router/config/auth
95 name: {{ include "common.fullname" . }}-auth
96 - mountPath: /opt/app/data-router/config/data-router.properties
97 name: {{ include "common.fullname" . }}-properties
98 subPath: data-router.properties
99 - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route
100 subPath: entity-event.route
101 name: {{ include "common.fullname" . }}-dynamic-route
102 - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
103 subPath: entity-event-policy.xml
104 name: {{ include "common.fullname" . }}-dynamic-policy
105 - mountPath: /logs/
106 name: {{ include "common.fullname" . }}-logs
107 ports:
108 - containerPort: {{ .Values.service.internalPort }}
109 {{- if eq .Values.liveness.enabled true }}
110 livenessProbe:
111 tcpSocket:
112 port: {{ .Values.service.internalPort }}
113 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
114 periodSeconds: {{ .Values.liveness.periodSeconds }}
115 {{ end -}}
116 readinessProbe:
117 tcpSocket:
118 port: {{ .Values.service.internalPort }}
119 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
120 periodSeconds: {{ .Values.readiness.periodSeconds }}
121 volumes:
122 - name: localtime
123 hostPath:
124 path: /etc/localtime
125 - name: {{ include "common.fullname" . }}-model-v8
126 configMap:
127 name: {{ include "common.fullname" . }}-model-v8
128 - name: {{ include "common.fullname" . }}-model-v9
129 configMap:
130 name: {{ include "common.fullname" . }}-model-v9
131 - name: {{ include "common.fullname" . }}-model-v10
132 configMap:
133 name: {{ include "common.fullname" . }}-model-v10
134 - name: {{ include "common.fullname" . }}-model-v11
135 configMap:
136 name: {{ include "common.fullname" . }}-model-v11
137 - name: {{ include "common.fullname" . }}-auth
138 secret:
139 secretName: {{ include "common.fullname" . }}
140 - name: {{ include "common.fullname" . }}-properties
141 configMap:
142 name: {{ include "common.fullname" . }}-prop
143 - name: {{ include "common.fullname" . }}-dynamic-route
144 configMap:
145 name: {{ include "common.fullname" . }}-dynamic
146 - name: {{ include "common.fullname" . }}-dynamic-policy
147 configMap:
148 name: {{ include "common.fullname" . }}-dynamic
149 - name: {{ include "common.fullname" . }}-logs
150 hostPath:
151 path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}
152 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
153 imagePullSecrets:
154 - name: "{{ include "common.namespace" . }}-docker-registry-key"