kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
toshrajbhardwaj | 84d73b1 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 AT&T |
kj | 6a8ce80 | 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: |
kranthikirang | 0307856 | 2018-12-07 16:12:02 -0500 | [diff] [blame] | 38 | {{- 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 }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 46 | 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" . }} |
BorislavG | 809b1d7 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 70 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 71 | 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 |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 91 | - mountPath: /opt/app/data-router/config/auth |
| 92 | name: {{ include "common.fullname" . }}-auth |
| 93 | - mountPath: /opt/app/data-router/config/data-router.properties |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 94 | subPath: data-router.properties |
Michael Arrastia | 091aff9 | 2018-06-15 16:30:04 +0100 | [diff] [blame] | 95 | name: {{ include "common.fullname" . }}-properties |
| 96 | - mountPath: /opt/app/data-router/config/schemaIngest.properties |
| 97 | subPath: schemaIngest.properties |
| 98 | name: {{ include "common.fullname" . }}-properties |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 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 |
fpaquett | af49e06 | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 105 | - mountPath: /opt/app/data-router/dynamic/conf/data-router-oxm.xml |
| 106 | subPath: data-router-oxm.xml |
| 107 | name: {{ include "common.fullname" . }}-dynamic-oxm |
michaere | 6140e11 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 108 | - 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 |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 112 | name: {{ include "common.fullname" . }}-logs |
fpaquett | af49e06 | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 113 | - mountPath: /logs |
| 114 | name: {{ include "common.fullname" . }}-logs |
| 115 | |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 116 | 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 }} |
rajeshkalai | 47c1de3 | 2018-09-20 06:36:28 -0400 | [diff] [blame] | 130 | resources: |
kranthikirang | 0307856 | 2018-12-07 16:12:02 -0500 | [diff] [blame] | 131 | {{ include "common.resources" . }} |
michaere | 6140e11 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 132 | |
| 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 |
fpaquett | af49e06 | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 143 | - mountPath: /logs |
| 144 | name: {{ include "common.fullname" . }}-logs |
michaere | 6140e11 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 145 | - mountPath: /usr/share/filebeat/data |
| 146 | name: aai-filebeat |
kranthikirang | 0307856 | 2018-12-07 16:12:02 -0500 | [diff] [blame] | 147 | resources: |
| 148 | {{ include "common.resources" . }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 149 | volumes: |
| 150 | - name: localtime |
| 151 | hostPath: |
| 152 | path: /etc/localtime |
michaere | 6140e11 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 153 | - name: filebeat-conf |
| 154 | configMap: |
| 155 | name: aai-filebeat |
| 156 | - name: aai-filebeat |
| 157 | emptyDir: {} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 158 | - 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 Arrastia | 091aff9 | 2018-06-15 16:30:04 +0100 | [diff] [blame] | 164 | items: |
| 165 | - key: data-router.properties |
| 166 | path: data-router.properties |
| 167 | - key: schemaIngest.properties |
| 168 | path: schemaIngest.properties |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 169 | - 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 |
fpaquett | af49e06 | 2018-10-10 08:51:06 -0400 | [diff] [blame] | 175 | - name: {{ include "common.fullname" . }}-dynamic-oxm |
| 176 | configMap: |
| 177 | name: {{ include "common.fullname" . }}-dynamic |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 178 | - name: {{ include "common.fullname" . }}-logs |
michaere | 6140e11 | 2018-10-01 11:45:50 +0100 | [diff] [blame] | 179 | 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 |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 186 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
| 187 | imagePullSecrets: |
| 188 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |