Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [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 |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [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: |
michaere | 1bd45e1 | 2018-10-29 14:23:55 +0000 | [diff] [blame] | 34 | initContainers: |
| 35 | - command: |
| 36 | - /root/ready.py |
| 37 | args: |
| 38 | - --container-name |
| 39 | - aai-cassandra |
| 40 | env: |
| 41 | - name: NAMESPACE |
| 42 | valueFrom: |
| 43 | fieldRef: |
| 44 | apiVersion: v1 |
| 45 | fieldPath: metadata.namespace |
| 46 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 47 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 48 | name: {{ include "common.name" . }}-readiness |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 49 | {{ if .Values.global.installSidecarSecurity }} |
| 50 | - name: {{ .Values.global.tproxyConfig.name }} |
| 51 | image: "{{ include "common.repository" . }}/{{ .Values.global.tproxyConfig.image }}" |
| 52 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 53 | securityContext: |
| 54 | privileged: true |
| 55 | {{ end }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 56 | containers: |
| 57 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 58 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 59 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 60 | ports: |
| 61 | - containerPort: {{ .Values.service.internalPort }} |
| 62 | # disable liveness probe when breakpoints set in debugger |
| 63 | # so K8s doesn't restart unresponsive container |
kj | 05b57f8 | 2018-03-28 18:10:32 +0300 | [diff] [blame] | 64 | {{ if .Values.liveness.enabled }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 65 | livenessProbe: |
| 66 | tcpSocket: |
| 67 | port: {{ .Values.service.internalPort }} |
| 68 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 69 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
kj | 05b57f8 | 2018-03-28 18:10:32 +0300 | [diff] [blame] | 70 | {{ end }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 71 | readinessProbe: |
| 72 | tcpSocket: |
| 73 | port: {{ .Values.service.internalPort }} |
| 74 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 75 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 76 | env: |
| 77 | - name: CONFIG_HOME |
| 78 | value: "/opt/app/champ-service/appconfig" |
| 79 | - name: GRAPHIMPL |
| 80 | value: "janus-deps" |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 81 | - name: KEY_STORE_PASSWORD |
| 82 | valueFrom: |
| 83 | secretKeyRef: |
| 84 | name: {{ template "common.fullname" . }}-pass |
| 85 | key: KEY_STORE_PASSWORD |
| 86 | - name: KEY_MANAGER_PASSWORD |
| 87 | valueFrom: |
| 88 | secretKeyRef: |
| 89 | name: {{ template "common.fullname" . }}-pass |
| 90 | key: KEY_MANAGER_PASSWORD |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 91 | - name: SERVICE_BEANS |
| 92 | value: "/opt/app/champ-service/dynamic/conf" |
| 93 | volumeMounts: |
| 94 | - mountPath: /etc/localtime |
| 95 | name: localtime |
| 96 | readOnly: true |
| 97 | - mountPath: /opt/app/champ-service/appconfig/champ-api.properties |
| 98 | name: {{ include "common.fullname" . }}-config |
| 99 | subPath: champ-api.properties |
| 100 | - mountPath: /opt/app/champ-service/appconfig/auth |
| 101 | name: {{ include "common.fullname" . }}-secrets |
| 102 | - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml |
| 103 | name: {{ include "common.fullname" . }}-dynamic-config |
| 104 | subPath: champ-beans.xml |
Shwetank Dave | b4333f9 | 2018-08-14 09:55:46 -0400 | [diff] [blame] | 105 | - mountPath: /opt/app/champ-service/bundleconfig/etc/logback.xml |
| 106 | name: {{ include "common.fullname" . }}-logback-config |
| 107 | subPath: logback.xml |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 108 | - mountPath: /var/log/onap |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 109 | name: {{ include "common.fullname" . }}-logs |
| 110 | resources: |
kranthikirang | cb25a53 | 2018-12-07 16:12:02 -0500 | [diff] [blame] | 111 | {{ include "common.resources" . }} |
| 112 | {{- if .Values.nodeSelector }} |
| 113 | nodeSelector: |
| 114 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 115 | {{- end -}} |
| 116 | {{- if .Values.affinity }} |
| 117 | affinity: |
| 118 | {{ toYaml .Values.affinity | indent 8 }} |
| 119 | {{- end }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 120 | |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 121 | # side car containers |
| 122 | - name: filebeat-onap |
| 123 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 124 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 125 | volumeMounts: |
| 126 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 127 | subPath: filebeat.yml |
| 128 | name: filebeat-conf |
| 129 | - mountPath: /var/log/onap |
| 130 | name: {{ include "common.fullname" . }}-logs |
| 131 | - mountPath: /usr/share/filebeat/data |
| 132 | name: aai-filebeat |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 133 | {{ if .Values.global.installSidecarSecurity }} |
| 134 | - name: {{ .Values.global.rproxy.name }} |
| 135 | image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}" |
| 136 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 137 | env: |
| 138 | - name: CONFIG_HOME |
| 139 | value: "/opt/app/rproxy/config" |
| 140 | - name: KEY_STORE_PASSWORD |
| 141 | value: {{ .Values.config.keyStorePassword }} |
| 142 | - name: spring_profiles_active |
| 143 | value: {{ .Values.global.rproxy.activeSpringProfiles }} |
| 144 | volumeMounts: |
| 145 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 146 | mountPath: /opt/app/rproxy/config/forward-proxy.properties |
| 147 | subPath: forward-proxy.properties |
| 148 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 149 | mountPath: /opt/app/rproxy/config/primary-service.properties |
| 150 | subPath: primary-service.properties |
| 151 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 152 | mountPath: /opt/app/rproxy/config/reverse-proxy.properties |
| 153 | subPath: reverse-proxy.properties |
| 154 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 155 | mountPath: /opt/app/rproxy/config/cadi.properties |
| 156 | subPath: cadi.properties |
| 157 | - name: {{ include "common.fullname" . }}-rproxy-log-config |
| 158 | mountPath: /opt/app/rproxy/config/logback-spring.xml |
| 159 | subPath: logback-spring.xml |
bwong21 | 8737f7e | 2019-03-14 17:15:58 +0000 | [diff] [blame^] | 160 | - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config |
| 161 | mountPath: /opt/app/rproxy/config/auth/uri-authorization.json |
| 162 | subPath: uri-authorization.json |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 163 | - name: {{ include "common.fullname" . }}-rproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 164 | mountPath: /opt/app/rproxy/config/auth/tomcat_keystore |
| 165 | subPath: tomcat_keystore |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 166 | - name: {{ include "common.fullname" . }}-rproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 167 | mountPath: /opt/app/rproxy/config/auth/client-cert.p12 |
| 168 | subPath: client-cert.p12 |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 169 | - name: {{ include "common.fullname" . }}-rproxy-auth-certs |
| 170 | mountPath: /opt/app/rproxy/config/auth/org.onap.aai.p12 |
| 171 | subPath: org.onap.aai.p12 |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 172 | - name: {{ include "common.fullname" . }}-rproxy-security-config |
| 173 | mountPath: /opt/app/rproxy/config/security/keyfile |
| 174 | subPath: keyfile |
| 175 | |
| 176 | ports: |
| 177 | - containerPort: {{ .Values.global.rproxy.port }} |
| 178 | |
| 179 | - name: {{ .Values.global.fproxy.name }} |
| 180 | image: "{{ include "common.repository" . }}/{{ .Values.global.fproxy.image }}" |
| 181 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 182 | env: |
| 183 | - name: CONFIG_HOME |
| 184 | value: "/opt/app/fproxy/config" |
| 185 | - name: KEY_STORE_PASSWORD |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 186 | value: {{ .Values.config.keyStorePassword }} |
| 187 | - name: TRUST_STORE_PASSWORD |
| 188 | value: {{ .Values.config.trustStorePassword }} |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 189 | - name: spring_profiles_active |
| 190 | value: {{ .Values.global.fproxy.activeSpringProfiles }} |
| 191 | volumeMounts: |
| 192 | - name: {{ include "common.fullname" . }}-fproxy-config |
| 193 | mountPath: /opt/app/fproxy/config/fproxy.properties |
| 194 | subPath: fproxy.properties |
| 195 | - name: {{ include "common.fullname" . }}-fproxy-log-config |
| 196 | mountPath: /opt/app/fproxy/config/logback-spring.xml |
| 197 | subPath: logback-spring.xml |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 198 | - name: {{ include "common.fullname" . }}-fproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 199 | mountPath: /opt/app/fproxy/config/auth/tomcat_keystore |
| 200 | subPath: tomcat_keystore |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 201 | - name: {{ include "common.fullname" . }}-fproxy-auth-certs |
| 202 | mountPath: /opt/app/fproxy/config/auth/fproxy_truststore |
| 203 | subPath: fproxy_truststore |
| 204 | - name: {{ include "common.fullname" . }}-fproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 205 | mountPath: /opt/app/fproxy/config/auth/client-cert.p12 |
| 206 | subPath: client-cert.p12 |
| 207 | ports: |
| 208 | - containerPort: {{ .Values.global.fproxy.port }} |
| 209 | {{ end }} |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 210 | |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 211 | volumes: |
| 212 | - name: localtime |
| 213 | hostPath: |
| 214 | path: /etc/localtime |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 215 | - name: {{ include "common.fullname" . }}-config |
| 216 | configMap: |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 217 | name: {{ include "common.fullname" . }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 218 | items: |
| 219 | - key: champ-api.properties |
| 220 | path: champ-api.properties |
| 221 | - name: {{ include "common.fullname" . }}-secrets |
| 222 | secret: |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 223 | secretName: {{ include "common.fullname" . }}-champ |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 224 | - name: {{ include "common.fullname" . }}-dynamic-config |
| 225 | configMap: |
Daniel Silverthorn | 82cee4d | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 226 | name: {{ include "common.fullname" . }}-dynamic |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 227 | items: |
| 228 | - key: champ-beans.xml |
| 229 | path: champ-beans.xml |
| 230 | - name: {{ include "common.fullname" . }}-logs |
| 231 | emptyDir: {} |
Shwetank Dave | b4333f9 | 2018-08-14 09:55:46 -0400 | [diff] [blame] | 232 | - name: {{ include "common.fullname" . }}-logback-config |
| 233 | configMap: |
| 234 | name: {{ include "common.fullname" . }}-log-configmap |
| 235 | items: |
| 236 | - key: logback.xml |
| 237 | path: logback.xml |
Michael Arrastia | 1149a06 | 2018-09-17 15:12:45 +0100 | [diff] [blame] | 238 | - name: filebeat-conf |
| 239 | configMap: |
| 240 | name: aai-filebeat |
| 241 | - name: aai-filebeat |
| 242 | emptyDir: {} |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 243 | {{ if .Values.global.installSidecarSecurity }} |
| 244 | - name: {{ include "common.fullname" . }}-rproxy-config |
| 245 | configMap: |
| 246 | name: {{ include "common.fullname" . }}-rproxy-config |
| 247 | - name: {{ include "common.fullname" . }}-rproxy-log-config |
| 248 | configMap: |
| 249 | name: {{ include "common.fullname" . }}-rproxy-log-config |
bwong21 | 8737f7e | 2019-03-14 17:15:58 +0000 | [diff] [blame^] | 250 | - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config |
| 251 | configMap: |
| 252 | name: {{ include "common.fullname" . }}-rproxy-uri-auth-config |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 253 | - name: {{ include "common.fullname" . }}-rproxy-auth-config |
| 254 | secret: |
| 255 | secretName: {{ include "common.fullname" . }}-rproxy-auth-config |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 256 | - name: {{ include "common.fullname" . }}-rproxy-auth-certs |
| 257 | secret: |
| 258 | secretName: aai-rproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 259 | - name: {{ include "common.fullname" . }}-rproxy-security-config |
| 260 | secret: |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 261 | secretName: aai-rproxy-security-config |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 262 | - name: {{ include "common.fullname" . }}-fproxy-config |
| 263 | configMap: |
| 264 | name: {{ include "common.fullname" . }}-fproxy-config |
| 265 | - name: {{ include "common.fullname" . }}-fproxy-log-config |
| 266 | configMap: |
| 267 | name: {{ include "common.fullname" . }}-fproxy-log-config |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 268 | - name: {{ include "common.fullname" . }}-fproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 269 | secret: |
Lee, Tian (tl5884) | fd8e7fb | 2019-01-11 16:52:27 +0000 | [diff] [blame] | 270 | secretName: aai-fproxy-auth-certs |
Ravi Geda | 9234bde | 2018-10-30 10:03:44 +0000 | [diff] [blame] | 271 | {{ end }} |
Daniel Silverthorn | 48f1070 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 272 | imagePullSecrets: |
| 273 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |