Jakub Latusek | d9c241b | 2020-10-21 13:36:30 +0200 | [diff] [blame] | 1 | {{/* |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
Krzysztof Opasiak | 4a4703b | 2020-02-08 01:04:48 +0100 | [diff] [blame] | 3 | # Copyright © 2020 Samsung Electronics |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Jakub Latusek | d9c241b | 2020-10-21 13:36:30 +0200 | [diff] [blame] | 16 | */}} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 17 | |
Magdalena_Biernacka | 50b1a39 | 2020-08-11 10:05:24 +0200 | [diff] [blame] | 18 | apiVersion: apps/v1 |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 19 | kind: Deployment |
| 20 | metadata: |
| 21 | name: {{ include "common.fullname" . }} |
| 22 | namespace: {{ include "common.namespace" . }} |
| 23 | labels: |
| 24 | app: {{ include "common.name" . }} |
| 25 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | spec: |
Magdalena_Biernacka | 50b1a39 | 2020-08-11 10:05:24 +0200 | [diff] [blame] | 29 | selector: |
| 30 | matchLabels: |
| 31 | app: {{ include "common.name" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 32 | replicas: {{ .Values.replicaCount }} |
| 33 | template: |
| 34 | metadata: |
| 35 | labels: |
| 36 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 37 | release: {{ include "common.release" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 38 | spec: |
| 39 | initContainers: |
| 40 | - command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 41 | - /app/ready.py |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 42 | args: |
Sonsino, Ofir (os0695) | 2dda01d | 2018-05-30 18:41:14 +0300 | [diff] [blame] | 43 | - --job-name |
RPMishra | e4ee7f1 | 2020-10-07 12:09:01 +0530 | [diff] [blame] | 44 | - {{ include "common.fullname" . }}-mariadb-init-config-job |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 45 | env: |
| 46 | - name: NAMESPACE |
| 47 | valueFrom: |
| 48 | fieldRef: |
| 49 | apiVersion: v1 |
| 50 | fieldPath: metadata.namespace |
Sylvain Desbureaux | ab116a5 | 2020-11-19 17:27:59 +0100 | [diff] [blame] | 51 | image: {{ include "repositoryGenerator.image.readiness" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 52 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 53 | name: {{ include "common.name" . }}-readiness |
| 54 | containers: |
| 55 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | ab116a5 | 2020-11-19 17:27:59 +0100 | [diff] [blame] | 56 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 57 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 58 | ports: |
| 59 | - containerPort: {{ .Values.service.internalPort }} |
| 60 | # disable liveness probe when breakpoints set in debugger |
| 61 | # so K8s doesn't restart unresponsive container |
| 62 | {{- if eq .Values.liveness.enabled true }} |
| 63 | livenessProbe: |
| 64 | tcpSocket: |
| 65 | port: {{ .Values.service.internalPort }} |
| 66 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 67 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 68 | {{ end -}} |
| 69 | readinessProbe: |
| 70 | tcpSocket: |
| 71 | port: {{ .Values.service.internalPort }} |
| 72 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 73 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 74 | env: |
| 75 | - name: ASDC_CLIENT_REST_HOST |
mahendrr | bb49cf9 | 2018-04-16 08:33:47 +0000 | [diff] [blame] | 76 | value: sdc-be.{{ include "common.namespace" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 77 | - name: ASDC_CLIENT_REST_AUTH |
| 78 | value: "{{ .Values.config.asdcclientrestauth }}" |
| 79 | - name: ASDC_CLIENT_REST_PORT |
| 80 | value: "{{ .Values.config.asdcclientrestport }}" |
k.kedron | c784bbd | 2019-09-05 18:28:16 +0200 | [diff] [blame] | 81 | - name: ASDC_CLIENT_REST_PROTOCOL |
| 82 | value: "https" |
biniek | b812766 | 2018-11-15 11:25:08 +0100 | [diff] [blame] | 83 | - name: VID_AAI_URL |
| 84 | value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 85 | - name: VID_ECOMP_SHARED_CONTEXT_REST_URL |
Roger Maitland | 0c6d4b8 | 2018-05-02 16:03:15 -0400 | [diff] [blame] | 86 | value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 87 | - name: VID_MSO_SERVER_URL |
Piotr Darosz | 2460a79 | 2018-10-05 09:57:42 +0200 | [diff] [blame] | 88 | value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 89 | - name: VID_MSO_PASS |
| 90 | value: "{{ .Values.config.vidmsopass }}" |
| 91 | - name: MSO_DME2_SERVER_URL |
| 92 | value: "{{ .Values.config.msodme2serverurl }}" |
| 93 | - name: MSO_DME2_ENABLED |
| 94 | value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }} |
| 95 | - name: VID_ECOMP_REDIRECT_URL |
Sonsino, Ofir (os0695) | c9a6edf | 2018-10-18 11:26:03 +0300 | [diff] [blame] | 96 | value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 97 | - name: VID_ECOMP_REST_URL |
Sonsino, Ofir (os0695) | 73d69b4 | 2018-10-31 10:55:49 +0200 | [diff] [blame] | 98 | value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi |
Sonsino, Ofir (os0695) | c9a6edf | 2018-10-18 11:26:03 +0300 | [diff] [blame] | 99 | - name: VID_ROLE_ACCESS_CENTRALIZED |
| 100 | value: "{{ .Values.config.roleaccesscentralized }}" |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 101 | - name: VID_CONTACT_US_LINK |
| 102 | value: "{{ .Values.config.vidcontactuslink }}" |
Ittay Stern | 2c00e1a | 2019-10-03 17:18:48 +0300 | [diff] [blame] | 103 | - name: VID_KEYSTORE_PASSWORD |
| 104 | value: {{ .Values.config.vidkeystorepassword | quote }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 105 | - name: VID_UEB_URL_LIST |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 106 | value: message-router.{{ include "common.namespace" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 107 | - name: VID_MYSQL_HOST |
RPMishra | e4ee7f1 | 2020-10-07 12:09:01 +0530 | [diff] [blame] | 108 | value: {{ include "common.mariadbService" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 109 | - name: VID_MYSQL_PORT |
RPMishra | e4ee7f1 | 2020-10-07 12:09:01 +0530 | [diff] [blame] | 110 | value: "{{ include "common.mariadbPort" . }}" |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 111 | - name: VID_MYSQL_DBNAME |
Sylvain Desbureaux | 6383c44 | 2019-11-14 09:28:12 +0100 | [diff] [blame] | 112 | value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 113 | - name: VID_MYSQL_USER |
Krzysztof Opasiak | e3519ef | 2020-03-24 03:25:05 +0100 | [diff] [blame] | 114 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 14 }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 115 | - name: VID_MYSQL_PASS |
Krzysztof Opasiak | e3519ef | 2020-03-24 03:25:05 +0100 | [diff] [blame] | 116 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 14 }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 117 | - name: VID_MYSQL_MAXCONNECTIONS |
| 118 | value: "{{ .Values.config.vidmysqlmaxconnections }}" |
| 119 | volumeMounts: |
Bartosz Gardziejewski | 533bbdb | 2019-08-07 14:49:10 +0200 | [diff] [blame] | 120 | - mountPath: /opt/app/vid/etc |
| 121 | name: vid-certs |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 122 | - mountPath: /etc/localtime |
| 123 | name: localtime |
| 124 | readOnly: true |
| 125 | - mountPath: /var/log/onap |
| 126 | name: vid-logs |
| 127 | - mountPath: /tmp/logback.xml |
| 128 | name: vid-logback |
| 129 | subPath: logback.xml |
| 130 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 131 | {{ include "common.resources" . | indent 12 }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 132 | {{- if .Values.nodeSelector }} |
| 133 | nodeSelector: |
| 134 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 135 | {{- end -}} |
| 136 | {{- if .Values.affinity }} |
| 137 | affinity: |
| 138 | {{ toYaml .Values.affinity | indent 10 }} |
| 139 | {{- end }} |
| 140 | # side car containers |
| 141 | - name: filebeat-onap |
Sylvain Desbureaux | ab116a5 | 2020-11-19 17:27:59 +0100 | [diff] [blame] | 142 | image: {{ include "repositoryGenerator.image.logging" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 143 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 144 | volumeMounts: |
| 145 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 146 | name: filebeat-conf |
| 147 | subPath: filebeat.yml |
| 148 | - mountPath: /var/log/onap |
| 149 | name: vid-logs |
| 150 | - mountPath: /usr/share/filebeat/data |
| 151 | name: vid-data-filebeat |
| 152 | volumes: |
Bartosz Gardziejewski | 533bbdb | 2019-08-07 14:49:10 +0200 | [diff] [blame] | 153 | - name: vid-certs |
| 154 | secret: |
| 155 | secretName: {{ include "common.fullname" . }}-certs |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 156 | - name: localtime |
| 157 | hostPath: |
| 158 | path: /etc/localtime |
| 159 | - name: filebeat-conf |
| 160 | configMap: |
| 161 | name: {{ include "common.fullname" . }}-filebeat-configmap |
| 162 | - name: vid-logs |
| 163 | emptyDir: {} |
| 164 | - name: vid-data-filebeat |
| 165 | emptyDir: {} |
| 166 | - name: vid-logback |
| 167 | configMap: |
| 168 | name: {{ include "common.fullname" . }}-log-configmap |
| 169 | imagePullSecrets: |
| 170 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |