blob: ce62679ee08a0aed0ba1ac4fab977e6b217d4b2d [file] [log] [blame]
Jennie Jia20bb5cd2018-08-16 15:50:33 +00001# Copyright © 2018 Amdocs
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: "{{ include "common.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 volumeMounts:
75 - mountPath: /etc/localtime
76 name: localtime
77 readOnly: true
78 - mountPath: /opt/app/data-router/config/auth
79 name: {{ include "common.fullname" . }}-auth
80 - mountPath: /opt/app/data-router/config/data-router.properties
81 subPath: data-router.properties
82 name: {{ include "common.fullname" . }}-properties
83 - mountPath: /opt/app/data-router/config/schemaIngest.properties
84 subPath: schemaIngest.properties
85 name: {{ include "common.fullname" . }}-properties
86 - mountPath: /opt/app/data-router/dynamic/routes/audit.route
87 subPath: audit.route
88 name: {{ include "common.fullname" . }}-dynamic-route
89 - mountPath: /opt/app/data-router/dynamic/routes/poaValidation.route
90 subPath: poaValidation.route
91 name: {{ include "common.fullname" . }}-dynamic-route
92 - mountPath: /opt/app/data-router/dynamic/conf/audit-bean.xml
93 subPath: audit-bean.xml
94 name: {{ include "common.fullname" . }}-dynamic-policy
95 - mountPath: /opt/app/data-router/dynamic/conf/poa-validation-bean.xml
96 subPath: poa-validation-bean.xml
97 name: {{ include "common.fullname" . }}-dynamic-policy
98 - mountPath: /logs/
99 name: {{ include "common.fullname" . }}-logs
100 ports:
101 - containerPort: {{ .Values.service.internalPort }}
102 {{- if eq .Values.liveness.enabled true }}
103 livenessProbe:
104 tcpSocket:
105 port: {{ .Values.service.internalPort }}
106 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
107 periodSeconds: {{ .Values.liveness.periodSeconds }}
108 {{ end -}}
109 readinessProbe:
110 tcpSocket:
111 port: {{ .Values.service.internalPort }}
112 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
113 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 volumes:
115 - name: localtime
116 hostPath:
117 path: /etc/localtime
118 - name: {{ include "common.fullname" . }}-auth
119 secret:
120 secretName: {{ include "common.fullname" . }}
121 - name: {{ include "common.fullname" . }}-properties
122 configMap:
123 name: {{ include "common.fullname" . }}-prop
124 items:
125 - key: data-router.properties
126 path: data-router.properties
127 - key: schemaIngest.properties
128 path: schemaIngest.properties
129 - name: {{ include "common.fullname" . }}-dynamic-route
130 configMap:
131 name: {{ include "common.fullname" . }}-dynamic
132 - name: {{ include "common.fullname" . }}-dynamic-policy
133 configMap:
134 name: {{ include "common.fullname" . }}-dynamic
135 - name: {{ include "common.fullname" . }}-logs
136 persistentVolumeClaim:
137 claimName: {{ include "common.fullname" . }}
138 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
139 imagePullSecrets:
140 - name: "{{ include "common.namespace" . }}-docker-registry-key"