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