priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, Bell Canada |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 15 | apiVersion: apps/v1 |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 16 | kind: Deployment |
| 17 | metadata: |
| 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 23 | release: {{ include "common.release" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 26 | selector: |
| 27 | matchLabels: |
| 28 | app: {{ include "common.name" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 29 | replicas: {{ .Values.replicaCount }} |
| 30 | template: |
| 31 | metadata: |
| 32 | labels: |
| 33 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 34 | release: {{ include "common.release" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 35 | spec: |
| 36 | initContainers: |
| 37 | - name: {{ include "common.name" . }}-readiness |
| 38 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 39 | - /app/ready.py |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 40 | args: |
| 41 | - --container-name |
| 42 | - "sdc-wfd-be" |
| 43 | env: |
| 44 | - name: NAMESPACE |
| 45 | valueFrom: |
| 46 | fieldRef: |
| 47 | apiVersion: v1 |
| 48 | fieldPath: metadata.namespace |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 49 | image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 50 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 51 | containers: |
| 52 | - name: {{ include "common.name" . }} |
| 53 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 54 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 55 | ports: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 56 | - containerPort: {{ template "wfd-fe.internalPort" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 57 | {{ if .Values.liveness.enabled }} |
| 58 | livenessProbe: |
| 59 | tcpSocket: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 60 | port: {{ template "wfd-fe.internalPort" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 61 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 62 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 63 | {{ end }} |
| 64 | readinessProbe: |
| 65 | tcpSocket: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 66 | port: {{ template "wfd-fe.internalPort" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 67 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 68 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 69 | env: |
| 70 | - name: ENVNAME |
| 71 | value: {{ .Values.global.env.name }} |
| 72 | - name: JAVA_OPTIONS |
| 73 | value: {{ .Values.config.javaOptions }} |
| 74 | - name: BACKEND |
| 75 | value: {{ .Values.config.backendServerURL }} |
dfx1971 | b2734ed | 2019-05-07 10:35:58 +0300 | [diff] [blame] | 76 | - name: IS_HTTPS |
| 77 | value: "{{ .Values.config.isHttpsEnabled}}" |
| 78 | {{ if and .Values.config.isHttpsEnabled (eq .Values.security.isDefaultStore false) }} |
| 79 | - name: KEYSTORE_PASS |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 80 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 81 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: keystore_password} |
dfx1971 | b2734ed | 2019-05-07 10:35:58 +0300 | [diff] [blame] | 82 | - name: TRUSTSTORE_PASS |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 83 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 84 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: truststore_password} |
dfx1971 | b2734ed | 2019-05-07 10:35:58 +0300 | [diff] [blame] | 85 | - name: TRUSTSTORE_PATH |
| 86 | value: "{{ .Values.security.storePath }}/{{ .Values.security.truststoreFilename }}" |
| 87 | - name: KEYSTORE_PATH |
| 88 | value: "{{ .Values.security.storePath }}/{{ .Values.security.keystoreFilename }}" |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 89 | - name: TRUST_ALL |
| 90 | value: "{{ .Values.config.isTrustAll}}" |
dfx1971 | b2734ed | 2019-05-07 10:35:58 +0300 | [diff] [blame] | 91 | {{ end }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 92 | volumeMounts: |
| 93 | - name: {{ include "common.fullname" . }}-localtime |
| 94 | mountPath: /etc/localtime |
| 95 | readOnly: true |
k.kedron | 2774ab1 | 2020-03-26 11:13:46 +0100 | [diff] [blame] | 96 | - name: sdc-cert |
| 97 | mountPath: /var/lib/jetty/etc/org.onap.sdc.p12 |
| 98 | subPath: org.onap.sdc.p12 |
| 99 | - name: sdc-cert |
| 100 | mountPath: /var/lib/jetty/etc/org.onap.sdc.trust.jks |
| 101 | subPath: org.onap.sdc.trust.jks |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 102 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 103 | {{ include "common.resources" . | indent 12 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [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 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 112 | # side car containers |
| 113 | - name: {{ include "common.name" . }}-filebeat-onap |
| 114 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 115 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 116 | volumeMounts: |
| 117 | - name: {{ include "common.fullname" . }}-filebeat-conf |
| 118 | mountPath: /usr/share/filebeat/filebeat.yml |
| 119 | subPath: filebeat.yml |
| 120 | - name: {{ include "common.fullname" . }}-logs |
| 121 | mountPath: /var/log/onap |
| 122 | - name: {{ include "common.fullname" . }}-data-filebeat |
| 123 | mountPath: /usr/share/filebeat/data |
| 124 | volumes: |
| 125 | - name: {{ include "common.fullname" . }}-localtime |
| 126 | hostPath: |
| 127 | path: /etc/localtime |
k.kedron | 2774ab1 | 2020-03-26 11:13:46 +0100 | [diff] [blame] | 128 | - name: sdc-cert |
| 129 | secret: |
| 130 | secretName: sdc-cert |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 131 | - name: {{ include "common.fullname" . }}-filebeat-conf |
| 132 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 133 | name: {{ include "common.release" . }}-sdc-filebeat-configmap |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 134 | - name: {{ include "common.fullname" . }}-data-filebeat |
| 135 | emptyDir: {} |
| 136 | - name: {{ include "common.fullname" . }}-logs |
| 137 | emptyDir: {} |
| 138 | imagePullSecrets: |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 139 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |