kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 AT&T |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 3 | # |
| 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 | |
| 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 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 }} |
| 26 | spec: |
| 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" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 62 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 63 | 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 |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 83 | - mountPath: /opt/app/data-router/config/auth |
| 84 | name: {{ include "common.fullname" . }}-auth |
| 85 | - mountPath: /opt/app/data-router/config/data-router.properties |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 86 | subPath: data-router.properties |
Michael Arrastia | e610648 | 2018-06-15 16:30:04 +0100 | [diff] [blame] | 87 | name: {{ include "common.fullname" . }}-properties |
| 88 | - mountPath: /opt/app/data-router/config/schemaIngest.properties |
| 89 | subPath: schemaIngest.properties |
| 90 | name: {{ include "common.fullname" . }}-properties |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 91 | - 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 |
fpaquett | 1dbbc3b | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 97 | - mountPath: /opt/app/data-router/dynamic/conf/data-router-oxm.xml |
| 98 | subPath: data-router-oxm.xml |
| 99 | name: {{ include "common.fullname" . }}-dynamic-oxm |
michaere | c20dfd0 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 100 | - mountPath: /opt/app/data-router/bundleconfig/etc/logback.xml |
| 101 | name: {{ include "common.fullname" . }}-logback-config |
| 102 | subPath: logback.xml |
| 103 | - mountPath: /var/log/onap |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 104 | name: {{ include "common.fullname" . }}-logs |
fpaquett | 1dbbc3b | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 105 | - mountPath: /logs |
| 106 | name: {{ include "common.fullname" . }}-logs |
| 107 | |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 108 | ports: |
| 109 | - containerPort: {{ .Values.service.internalPort }} |
| 110 | {{- if eq .Values.liveness.enabled true }} |
| 111 | livenessProbe: |
| 112 | tcpSocket: |
| 113 | port: {{ .Values.service.internalPort }} |
| 114 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 115 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 116 | {{ end -}} |
| 117 | readinessProbe: |
| 118 | tcpSocket: |
| 119 | port: {{ .Values.service.internalPort }} |
| 120 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 121 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
rajeshkalai | 9fcfbce | 2018-09-20 06:36:28 -0400 | [diff] [blame] | 122 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 123 | {{ include "common.resources" . | indent 12 }} |
michaere | c20dfd0 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 124 | |
| 125 | # side car containers |
| 126 | - name: filebeat-onap |
| 127 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 128 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 129 | volumeMounts: |
| 130 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 131 | subPath: filebeat.yml |
| 132 | name: filebeat-conf |
| 133 | - mountPath: /var/log/onap |
| 134 | name: {{ include "common.fullname" . }}-logs |
fpaquett | 1dbbc3b | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 135 | - mountPath: /logs |
| 136 | name: {{ include "common.fullname" . }}-logs |
michaere | c20dfd0 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 137 | - mountPath: /usr/share/filebeat/data |
| 138 | name: aai-filebeat |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 139 | volumes: |
| 140 | - name: localtime |
| 141 | hostPath: |
| 142 | path: /etc/localtime |
michaere | c20dfd0 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 143 | - name: filebeat-conf |
| 144 | configMap: |
| 145 | name: aai-filebeat |
| 146 | - name: aai-filebeat |
| 147 | emptyDir: {} |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 148 | - name: {{ include "common.fullname" . }}-auth |
| 149 | secret: |
| 150 | secretName: {{ include "common.fullname" . }} |
| 151 | - name: {{ include "common.fullname" . }}-properties |
| 152 | configMap: |
| 153 | name: {{ include "common.fullname" . }}-prop |
Michael Arrastia | e610648 | 2018-06-15 16:30:04 +0100 | [diff] [blame] | 154 | items: |
| 155 | - key: data-router.properties |
| 156 | path: data-router.properties |
| 157 | - key: schemaIngest.properties |
| 158 | path: schemaIngest.properties |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 159 | - name: {{ include "common.fullname" . }}-dynamic-route |
| 160 | configMap: |
| 161 | name: {{ include "common.fullname" . }}-dynamic |
| 162 | - name: {{ include "common.fullname" . }}-dynamic-policy |
| 163 | configMap: |
| 164 | name: {{ include "common.fullname" . }}-dynamic |
fpaquett | 1dbbc3b | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 165 | - name: {{ include "common.fullname" . }}-dynamic-oxm |
| 166 | configMap: |
| 167 | name: {{ include "common.fullname" . }}-dynamic |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 168 | - name: {{ include "common.fullname" . }}-logs |
michaere | c20dfd0 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 169 | emptyDir: {} |
| 170 | - name: {{ include "common.fullname" . }}-logback-config |
| 171 | configMap: |
| 172 | name: {{ include "common.fullname" . }}-log-configmap |
| 173 | items: |
| 174 | - key: logback.xml |
| 175 | path: logback.xml |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 176 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
| 177 | imagePullSecrets: |
| 178 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |