blob: 5c0d9b2f8d12b1c12ffa954b437f6e915eaa36b9 [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:
kranthikirang03078562018-12-07 16:12:02 -050038 {{- if .Values.nodeSelector }}
39 nodeSelector:
40{{ toYaml .Values.nodeSelector | indent 8 }}
41 {{- end -}}
42 {{- if .Values.affinity }}
43 affinity:
44{{ toYaml .Values.affinity | indent 8 }}
45 {{- end }}
kj6a8ce802018-03-19 15:07:44 +020046 initContainers:
47 - command:
48 - /bin/sh
49 - -c
50 - |
51 mkdir -p /logroot/data-router/logs
52 chmod -R 777 /logroot/data-router/logs
53 chown -R root:root /logroot
54 env:
55 - name: NAMESPACE
56 valueFrom:
57 fieldRef:
58 apiVersion: v1
59 fieldPath: metadata.namespace
60 securityContext:
61 privileged: true
62 image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 name: init-sysctl
65 volumeMounts:
66 - name: {{ include "common.fullname" . }}-logs
67 mountPath: /logroot/
68 containers:
69 - name: {{ include "common.name" . }}
BorislavG809b1d72018-05-06 12:55:20 +000070 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj6a8ce802018-03-19 15:07:44 +020071 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 env:
73 - name: SERVICE_BEANS
74 value: /opt/app/data-router/dynamic/conf
75 - name: CONFIG_HOME
76 value: /opt/app/data-router/config/
77 - name: KEY_STORE_PASSWORD
78 value: {{ .Values.config.keyStorePassword }}
79 - name: DYNAMIC_ROUTES
80 value: /opt/app/data-router/dynamic/routes
81 - name: KEY_MANAGER_PASSWORD
82 value: {{ .Values.config.keyManagerPassword }}
83 - name: PATH
84 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
85 - name: JAVA_HOME
86 value: usr/lib/jvm/java-8-openjdk-amd64
87 volumeMounts:
88 - mountPath: /etc/localtime
89 name: localtime
90 readOnly: true
kj6a8ce802018-03-19 15:07:44 +020091 - mountPath: /opt/app/data-router/config/auth
92 name: {{ include "common.fullname" . }}-auth
93 - mountPath: /opt/app/data-router/config/data-router.properties
kj6a8ce802018-03-19 15:07:44 +020094 subPath: data-router.properties
Michael Arrastia091aff92018-06-15 16:30:04 +010095 name: {{ include "common.fullname" . }}-properties
96 - mountPath: /opt/app/data-router/config/schemaIngest.properties
97 subPath: schemaIngest.properties
98 name: {{ include "common.fullname" . }}-properties
kj6a8ce802018-03-19 15:07:44 +020099 - 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
fpaquettaf49e062018-10-10 08:51:06 -0400105 - mountPath: /opt/app/data-router/dynamic/conf/data-router-oxm.xml
106 subPath: data-router-oxm.xml
107 name: {{ include "common.fullname" . }}-dynamic-oxm
michaere6140e112018-10-01 11:45:50 +0100108 - mountPath: /opt/app/data-router/bundleconfig/etc/logback.xml
109 name: {{ include "common.fullname" . }}-logback-config
110 subPath: logback.xml
111 - mountPath: /var/log/onap
kj6a8ce802018-03-19 15:07:44 +0200112 name: {{ include "common.fullname" . }}-logs
fpaquettaf49e062018-10-10 08:51:06 -0400113 - mountPath: /logs
114 name: {{ include "common.fullname" . }}-logs
115
kj6a8ce802018-03-19 15:07:44 +0200116 ports:
117 - containerPort: {{ .Values.service.internalPort }}
118 {{- if eq .Values.liveness.enabled true }}
119 livenessProbe:
120 tcpSocket:
121 port: {{ .Values.service.internalPort }}
122 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
123 periodSeconds: {{ .Values.liveness.periodSeconds }}
124 {{ end -}}
125 readinessProbe:
126 tcpSocket:
127 port: {{ .Values.service.internalPort }}
128 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
129 periodSeconds: {{ .Values.readiness.periodSeconds }}
rajeshkalai47c1de32018-09-20 06:36:28 -0400130 resources:
kranthikirang03078562018-12-07 16:12:02 -0500131{{ include "common.resources" . }}
michaere6140e112018-10-01 11:45:50 +0100132
133 # side car containers
134 - name: filebeat-onap
135 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
136 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
137 volumeMounts:
138 - mountPath: /usr/share/filebeat/filebeat.yml
139 subPath: filebeat.yml
140 name: filebeat-conf
141 - mountPath: /var/log/onap
142 name: {{ include "common.fullname" . }}-logs
fpaquettaf49e062018-10-10 08:51:06 -0400143 - mountPath: /logs
144 name: {{ include "common.fullname" . }}-logs
michaere6140e112018-10-01 11:45:50 +0100145 - mountPath: /usr/share/filebeat/data
146 name: aai-filebeat
kranthikirang03078562018-12-07 16:12:02 -0500147 resources:
148{{ include "common.resources" . }}
kj6a8ce802018-03-19 15:07:44 +0200149 volumes:
150 - name: localtime
151 hostPath:
152 path: /etc/localtime
michaere6140e112018-10-01 11:45:50 +0100153 - name: filebeat-conf
154 configMap:
155 name: aai-filebeat
156 - name: aai-filebeat
157 emptyDir: {}
kj6a8ce802018-03-19 15:07:44 +0200158 - name: {{ include "common.fullname" . }}-auth
159 secret:
160 secretName: {{ include "common.fullname" . }}
161 - name: {{ include "common.fullname" . }}-properties
162 configMap:
163 name: {{ include "common.fullname" . }}-prop
Michael Arrastia091aff92018-06-15 16:30:04 +0100164 items:
165 - key: data-router.properties
166 path: data-router.properties
167 - key: schemaIngest.properties
168 path: schemaIngest.properties
kj6a8ce802018-03-19 15:07:44 +0200169 - name: {{ include "common.fullname" . }}-dynamic-route
170 configMap:
171 name: {{ include "common.fullname" . }}-dynamic
172 - name: {{ include "common.fullname" . }}-dynamic-policy
173 configMap:
174 name: {{ include "common.fullname" . }}-dynamic
fpaquettaf49e062018-10-10 08:51:06 -0400175 - name: {{ include "common.fullname" . }}-dynamic-oxm
176 configMap:
177 name: {{ include "common.fullname" . }}-dynamic
kj6a8ce802018-03-19 15:07:44 +0200178 - name: {{ include "common.fullname" . }}-logs
michaere6140e112018-10-01 11:45:50 +0100179 emptyDir: {}
180 - name: {{ include "common.fullname" . }}-logback-config
181 configMap:
182 name: {{ include "common.fullname" . }}-log-configmap
183 items:
184 - key: logback.xml
185 path: logback.xml
kj6a8ce802018-03-19 15:07:44 +0200186 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
187 imagePullSecrets:
188 - name: "{{ include "common.namespace" . }}-docker-registry-key"