blob: 585cc4ff3d2473a9ecd3cbccaaf95a686b2863d1 [file] [log] [blame]
kj6a8ce802018-03-19 15:07:44 +02001# Copyright © 2017 Amdocs, Bell Canada
toshrajbhardwaj84d73b12018-08-06 07:35:14 +00002# Modifications Copyright © 2018 AT&T
kj6a8ce802018-03-19 15:07:44 +02003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 selector:
29 matchLabels:
30 app: {{ include "common.name" . }}
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 name: {{ include "common.name" . }}
37 spec:
38 initContainers:
39 - command:
40 - /bin/sh
41 - -c
42 - |
43 mkdir -p /logroot/data-router/logs
44 chmod -R 777 /logroot/data-router/logs
45 chown -R root:root /logroot
46 env:
47 - name: NAMESPACE
48 valueFrom:
49 fieldRef:
50 apiVersion: v1
51 fieldPath: metadata.namespace
52 securityContext:
53 privileged: true
54 image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 name: init-sysctl
57 volumeMounts:
58 - name: {{ include "common.fullname" . }}-logs
59 mountPath: /logroot/
60 containers:
61 - name: {{ include "common.name" . }}
BorislavG809b1d72018-05-06 12:55:20 +000062 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj6a8ce802018-03-19 15:07:44 +020063 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 env:
65 - name: SERVICE_BEANS
66 value: /opt/app/data-router/dynamic/conf
67 - name: CONFIG_HOME
68 value: /opt/app/data-router/config/
69 - name: KEY_STORE_PASSWORD
70 value: {{ .Values.config.keyStorePassword }}
71 - name: DYNAMIC_ROUTES
72 value: /opt/app/data-router/dynamic/routes
73 - name: KEY_MANAGER_PASSWORD
74 value: {{ .Values.config.keyManagerPassword }}
75 - name: PATH
76 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
77 - name: JAVA_HOME
78 value: usr/lib/jvm/java-8-openjdk-amd64
79 volumeMounts:
80 - mountPath: /etc/localtime
81 name: localtime
82 readOnly: true
kj6a8ce802018-03-19 15:07:44 +020083 - mountPath: /opt/app/data-router/config/auth
84 name: {{ include "common.fullname" . }}-auth
85 - mountPath: /opt/app/data-router/config/data-router.properties
kj6a8ce802018-03-19 15:07:44 +020086 subPath: data-router.properties
Michael Arrastia091aff92018-06-15 16:30:04 +010087 name: {{ include "common.fullname" . }}-properties
88 - mountPath: /opt/app/data-router/config/schemaIngest.properties
89 subPath: schemaIngest.properties
90 name: {{ include "common.fullname" . }}-properties
kj6a8ce802018-03-19 15:07:44 +020091 - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route
92 subPath: entity-event.route
93 name: {{ include "common.fullname" . }}-dynamic-route
94 - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
95 subPath: entity-event-policy.xml
96 name: {{ include "common.fullname" . }}-dynamic-policy
97 - mountPath: /logs/
98 name: {{ include "common.fullname" . }}-logs
99 ports:
100 - containerPort: {{ .Values.service.internalPort }}
101 {{- if eq .Values.liveness.enabled true }}
102 livenessProbe:
103 tcpSocket:
104 port: {{ .Values.service.internalPort }}
105 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
106 periodSeconds: {{ .Values.liveness.periodSeconds }}
107 {{ end -}}
108 readinessProbe:
109 tcpSocket:
110 port: {{ .Values.service.internalPort }}
111 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
112 periodSeconds: {{ .Values.readiness.periodSeconds }}
rajeshkalai47c1de32018-09-20 06:36:28 -0400113 resources:
114{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
kj6a8ce802018-03-19 15:07:44 +0200115 volumes:
116 - name: localtime
117 hostPath:
118 path: /etc/localtime
kj6a8ce802018-03-19 15:07:44 +0200119 - name: {{ include "common.fullname" . }}-auth
120 secret:
121 secretName: {{ include "common.fullname" . }}
122 - name: {{ include "common.fullname" . }}-properties
123 configMap:
124 name: {{ include "common.fullname" . }}-prop
Michael Arrastia091aff92018-06-15 16:30:04 +0100125 items:
126 - key: data-router.properties
127 path: data-router.properties
128 - key: schemaIngest.properties
129 path: schemaIngest.properties
kj6a8ce802018-03-19 15:07:44 +0200130 - name: {{ include "common.fullname" . }}-dynamic-route
131 configMap:
132 name: {{ include "common.fullname" . }}-dynamic
133 - name: {{ include "common.fullname" . }}-dynamic-policy
134 configMap:
135 name: {{ include "common.fullname" . }}-dynamic
136 - name: {{ include "common.fullname" . }}-logs
137 hostPath:
BorislavGe6ed02a2018-05-03 14:29:51 +0000138 path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
kj6a8ce802018-03-19 15:07:44 +0200139 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
140 imagePullSecrets:
141 - name: "{{ include "common.namespace" . }}-docker-registry-key"