Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, AT&T |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Bell Canada |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [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 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
| 32 | release: {{ .Release.Name }} |
| 33 | spec: |
Edwin Lawrance | 0a444a8 | 2018-10-24 14:47:01 +0100 | [diff] [blame] | 34 | {{ if .Values.global.installSidecarSecurity }} |
| 35 | hostAliases: |
| 36 | - ip: {{ .Values.global.aaf.serverIp }} |
| 37 | hostnames: |
| 38 | - {{ .Values.global.aaf.serverHostname }} |
| 39 | |
| 40 | initContainers: |
| 41 | - name: {{ .Values.global.tproxyConfig.name }} |
| 42 | image: "{{ include "common.repository" . }}/{{ .Values.global.tproxyConfig.image }}" |
| 43 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 44 | securityContext: |
| 45 | privileged: true |
| 46 | {{ end }} |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 47 | containers: |
| 48 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 49 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 50 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 51 | ports: |
| 52 | - containerPort: {{ .Values.service.internalPort }} |
| 53 | # disable liveness probe when breakpoints set in debugger |
| 54 | # so K8s doesn't restart unresponsive container |
| 55 | {{ if .Values.liveness.enabled }} |
| 56 | livenessProbe: |
| 57 | tcpSocket: |
| 58 | port: {{ .Values.service.internalPort }} |
| 59 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 60 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 61 | {{ end }} |
| 62 | readinessProbe: |
| 63 | tcpSocket: |
| 64 | port: {{ .Values.service.internalPort }} |
| 65 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 66 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 67 | env: |
| 68 | - name: CONFIG_HOME |
| 69 | value: /opt/app/babel/config |
| 70 | - name: KEY_STORE_PASSWORD |
| 71 | valueFrom: |
| 72 | secretKeyRef: |
| 73 | name: {{ template "common.fullname" . }}-pass |
| 74 | key: KEY_STORE_PASSWORD |
| 75 | - name: KEY_MANAGER_PASSWORD |
| 76 | valueFrom: |
| 77 | secretKeyRef: |
| 78 | name: {{ template "common.fullname" . }}-pass |
| 79 | key: KEY_MANAGER_PASSWORD |
| 80 | volumeMounts: |
| 81 | - mountPath: /etc/localtime |
| 82 | name: localtime |
| 83 | readOnly: true |
| 84 | - mountPath: /opt/app/babel/config/artifact-generator.properties |
| 85 | name: {{ include "common.fullname" . }}-config |
| 86 | subPath: artifact-generator.properties |
Alexis de Talhouët | 7b12522 | 2018-09-19 09:02:33 -0400 | [diff] [blame] | 87 | - mountPath: /opt/app/babel/config/filter-types.properties |
| 88 | name: {{ include "common.fullname" . }}-config |
| 89 | subPath: filter-types.properties |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 90 | - mountPath: /opt/app/babel/config/babel-auth.properties |
| 91 | name: {{ include "common.fullname" . }}-config |
| 92 | subPath: babel-auth.properties |
| 93 | - mountPath: /opt/app/babel/config/auth |
| 94 | name: {{ include "common.fullname" . }}-secrets |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 95 | - mountPath: /var/log/onap |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 96 | name: {{ include "common.fullname" . }}-logs |
Jimmy Forsyth | b4b0948 | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 97 | - mountPath: /opt/app/babel/config/logback.xml |
| 98 | name: {{ include "common.fullname" . }}-config |
| 99 | subPath: logback.xml |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 100 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 101 | {{ include "common.resources" . | indent 12 }} |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 102 | {{- if .Values.nodeSelector }} |
| 103 | nodeSelector: |
| 104 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 105 | {{- end -}} |
| 106 | {{- if .Values.affinity }} |
| 107 | affinity: |
| 108 | {{ toYaml .Values.affinity | indent 10 }} |
| 109 | {{- end }} |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 110 | |
| 111 | # side car containers |
| 112 | - name: filebeat-onap |
| 113 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 114 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 115 | volumeMounts: |
| 116 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 117 | subPath: filebeat.yml |
| 118 | name: filebeat-conf |
| 119 | - mountPath: /var/log/onap |
| 120 | name: {{ include "common.fullname" . }}-logs |
| 121 | - mountPath: /usr/share/filebeat/data |
| 122 | name: aai-filebeat |
| 123 | |
Edwin Lawrance | 0a444a8 | 2018-10-24 14:47:01 +0100 | [diff] [blame] | 124 | {{ if .Values.global.installSidecarSecurity }} |
| 125 | - name: {{ .Values.global.rproxy.name }} |
| 126 | image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}" |
| 127 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 128 | env: |
| 129 | - name: CONFIG_HOME |
| 130 | value: "/opt/app/rproxy/config" |
| 131 | - name: KEY_STORE_PASSWORD |
| 132 | value: {{ .Values.config.keyStorePassword }} |
| 133 | - name: spring_profiles_active |
| 134 | value: {{ .Values.global.rproxy.activeSpringProfiles }} |
| 135 | volumeMounts: |
| 136 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 137 | mountPath: /opt/app/rproxy/config/forward-proxy.properties |
| 138 | subPath: forward-proxy.properties |
| 139 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 140 | mountPath: /opt/app/rproxy/config/primary-service.properties |
| 141 | subPath: primary-service.properties |
| 142 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 143 | mountPath: /opt/app/rproxy/config/reverse-proxy.properties |
| 144 | subPath: reverse-proxy.properties |
| 145 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 146 | mountPath: /opt/app/rproxy/config/cadi.properties |
| 147 | subPath: cadi.properties |
| 148 | - name: {{ include "common.fullname" . }}-rproxy-log-config |
| 149 | mountPath: /opt/app/rproxy/config/logback-spring.xml |
| 150 | subPath: logback-spring.xml |
| 151 | - name: {{ include "common.fullname" . }}-rproxy-auth-config |
| 152 | mountPath: /opt/app/rproxy/config/auth/tomcat_keystore |
| 153 | subPath: tomcat_keystore |
| 154 | - name: {{ include "common.fullname" . }}-rproxy-auth-config |
| 155 | mountPath: /opt/app/rproxy/config/auth/client-cert.p12 |
| 156 | subPath: client-cert.p12 |
| 157 | - name: {{ include "common.fullname" . }}-rproxy-auth-config |
| 158 | mountPath: /opt/app/rproxy/config/auth/uri-authorization.json |
| 159 | subPath: uri-authorization.json |
| 160 | - name: {{ include "common.fullname" . }}-rproxy-auth-config |
| 161 | mountPath: /opt/app/rproxy/config/auth/aaf_truststore.jks |
| 162 | subPath: aaf_truststore.jks |
| 163 | - name: {{ include "common.fullname" . }}-rproxy-security-config |
| 164 | mountPath: /opt/app/rproxy/config/security/keyfile |
| 165 | subPath: keyfile |
| 166 | |
| 167 | ports: |
| 168 | - containerPort: {{ .Values.global.rproxy.port }} |
| 169 | |
| 170 | - name: {{ .Values.global.fproxy.name }} |
| 171 | image: "{{ include "common.repository" . }}/{{ .Values.global.fproxy.image }}" |
| 172 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 173 | env: |
| 174 | - name: CONFIG_HOME |
| 175 | value: "/opt/app/fproxy/config" |
| 176 | - name: KEY_STORE_PASSWORD |
| 177 | value: {{ .Values.config.keyStorePassword }} |
| 178 | - name: spring_profiles_active |
| 179 | value: {{ .Values.global.fproxy.activeSpringProfiles }} |
| 180 | volumeMounts: |
| 181 | - name: {{ include "common.fullname" . }}-fproxy-config |
| 182 | mountPath: /opt/app/fproxy/config/fproxy.properties |
| 183 | subPath: fproxy.properties |
| 184 | - name: {{ include "common.fullname" . }}-fproxy-log-config |
| 185 | mountPath: /opt/app/fproxy/config/logback-spring.xml |
| 186 | subPath: logback-spring.xml |
| 187 | - name: {{ include "common.fullname" . }}-fproxy-auth-config |
| 188 | mountPath: /opt/app/fproxy/config/auth/tomcat_keystore |
| 189 | subPath: tomcat_keystore |
| 190 | - name: {{ include "common.fullname" . }}-fproxy-auth-config |
| 191 | mountPath: /opt/app/fproxy/config/auth/client-cert.p12 |
| 192 | subPath: client-cert.p12 |
| 193 | ports: |
| 194 | - containerPort: {{ .Values.global.fproxy.port }} |
| 195 | {{ end }} |
| 196 | |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 197 | volumes: |
| 198 | - name: localtime |
| 199 | hostPath: |
| 200 | path: /etc/localtime |
| 201 | - name: {{ include "common.fullname" . }}-config |
| 202 | configMap: |
| 203 | name: {{ include "common.fullname" . }}-configmap |
| 204 | items: |
| 205 | - key: artifact-generator.properties |
| 206 | path: artifact-generator.properties |
Alexis de Talhouët | 7b12522 | 2018-09-19 09:02:33 -0400 | [diff] [blame] | 207 | - key: filter-types.properties |
| 208 | path: filter-types.properties |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 209 | - key: babel-auth.properties |
| 210 | path: babel-auth.properties |
Jimmy Forsyth | b4b0948 | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 211 | - key: logback.xml |
| 212 | path: logback.xml |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 213 | - name: {{ include "common.fullname" . }}-secrets |
| 214 | secret: |
| 215 | secretName: {{ include "common.fullname" . }}-babel-secrets |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 216 | - name: filebeat-conf |
| 217 | configMap: |
| 218 | name: aai-filebeat |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 219 | - name: {{ include "common.fullname" . }}-logs |
| 220 | emptyDir: {} |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 221 | - name: aai-filebeat |
| 222 | emptyDir: {} |
Edwin Lawrance | 0a444a8 | 2018-10-24 14:47:01 +0100 | [diff] [blame] | 223 | {{ if .Values.global.installSidecarSecurity }} |
| 224 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 225 | configMap: |
| 226 | name: {{ include "common.fullname" . }}-rproxy-config |
| 227 | - name: {{ include "common.fullname" . }}-rproxy-log-config |
| 228 | configMap: |
| 229 | name: {{ include "common.fullname" . }}-rproxy-log-config |
| 230 | - name: {{ include "common.fullname" . }}-rproxy-auth-config |
| 231 | secret: |
| 232 | secretName: {{ include "common.fullname" . }}-rproxy-auth-config |
| 233 | - name: {{ include "common.fullname" . }}-rproxy-security-config |
| 234 | secret: |
| 235 | secretName: {{ include "common.fullname" . }}-rproxy-security-config |
| 236 | - name: {{ include "common.fullname" . }}-fproxy-config |
| 237 | configMap: |
| 238 | name: {{ include "common.fullname" . }}-fproxy-config |
| 239 | - name: {{ include "common.fullname" . }}-fproxy-log-config |
| 240 | configMap: |
| 241 | name: {{ include "common.fullname" . }}-fproxy-log-config |
| 242 | - name: {{ include "common.fullname" . }}-fproxy-auth-config |
| 243 | secret: |
| 244 | secretName: {{ include "common.fullname" . }}-fproxy-auth-config |
| 245 | {{ end }} |
| 246 | |
Michael Arrastia | 6c3ba49 | 2018-03-29 14:53:40 +0100 | [diff] [blame] | 247 | imagePullSecrets: |
| 248 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |