Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
Krzysztof Opasiak | 4a4703b | 2020-02-08 01:04:48 +0100 | [diff] [blame] | 2 | # Copyright © 2020 Samsung Electronics |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [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 "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 24 | release: {{ include "common.release" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 32 | release: {{ include "common.release" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 33 | spec: |
| 34 | initContainers: |
| 35 | - command: |
Mandeep Khinda | 561a91c | 2018-08-23 14:08:52 +0000 | [diff] [blame] | 36 | - /root/job_complete.py |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 37 | args: |
Sonsino, Ofir (os0695) | 2dda01d | 2018-05-30 18:41:14 +0300 | [diff] [blame] | 38 | - --job-name |
Julien Barbot | 8cd9447 | 2018-10-23 12:15:31 +0200 | [diff] [blame] | 39 | - {{ include "common.fullname" . }}-galera-config |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 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 |
| 49 | containers: |
| 50 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 51 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 52 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 53 | ports: |
| 54 | - containerPort: {{ .Values.service.internalPort }} |
| 55 | # disable liveness probe when breakpoints set in debugger |
| 56 | # so K8s doesn't restart unresponsive container |
| 57 | {{- if eq .Values.liveness.enabled true }} |
| 58 | livenessProbe: |
| 59 | tcpSocket: |
| 60 | port: {{ .Values.service.internalPort }} |
| 61 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 62 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 63 | {{ end -}} |
| 64 | readinessProbe: |
| 65 | tcpSocket: |
| 66 | port: {{ .Values.service.internalPort }} |
| 67 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 68 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 69 | env: |
| 70 | - name: ASDC_CLIENT_REST_HOST |
mahendrr | bb49cf9 | 2018-04-16 08:33:47 +0000 | [diff] [blame] | 71 | value: sdc-be.{{ include "common.namespace" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 72 | - name: ASDC_CLIENT_REST_AUTH |
| 73 | value: "{{ .Values.config.asdcclientrestauth }}" |
| 74 | - name: ASDC_CLIENT_REST_PORT |
| 75 | value: "{{ .Values.config.asdcclientrestport }}" |
k.kedron | c784bbd | 2019-09-05 18:28:16 +0200 | [diff] [blame] | 76 | - name: ASDC_CLIENT_REST_PROTOCOL |
| 77 | value: "https" |
biniek | b812766 | 2018-11-15 11:25:08 +0100 | [diff] [blame] | 78 | - name: VID_AAI_URL |
| 79 | value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 80 | - name: VID_ECOMP_SHARED_CONTEXT_REST_URL |
Roger Maitland | 0c6d4b8 | 2018-05-02 16:03:15 -0400 | [diff] [blame] | 81 | value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 82 | - name: VID_MSO_SERVER_URL |
Piotr Darosz | 2460a79 | 2018-10-05 09:57:42 +0200 | [diff] [blame] | 83 | value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 84 | - name: VID_MSO_PASS |
| 85 | value: "{{ .Values.config.vidmsopass }}" |
| 86 | - name: MSO_DME2_SERVER_URL |
| 87 | value: "{{ .Values.config.msodme2serverurl }}" |
| 88 | - name: MSO_DME2_ENABLED |
| 89 | value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }} |
| 90 | - name: VID_ECOMP_REDIRECT_URL |
Sonsino, Ofir (os0695) | c9a6edf | 2018-10-18 11:26:03 +0300 | [diff] [blame] | 91 | value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 92 | - name: VID_ECOMP_REST_URL |
Sonsino, Ofir (os0695) | 73d69b4 | 2018-10-31 10:55:49 +0200 | [diff] [blame] | 93 | value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi |
Sonsino, Ofir (os0695) | c9a6edf | 2018-10-18 11:26:03 +0300 | [diff] [blame] | 94 | - name: VID_ROLE_ACCESS_CENTRALIZED |
| 95 | value: "{{ .Values.config.roleaccesscentralized }}" |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 96 | - name: VID_CONTACT_US_LINK |
| 97 | value: "{{ .Values.config.vidcontactuslink }}" |
Ittay Stern | 2c00e1a | 2019-10-03 17:18:48 +0300 | [diff] [blame] | 98 | - name: VID_KEYSTORE_PASSWORD |
| 99 | value: {{ .Values.config.vidkeystorepassword | quote }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 100 | - name: VID_UEB_URL_LIST |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 101 | value: message-router.{{ include "common.namespace" . }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 102 | - name: VID_MYSQL_HOST |
Sylvain Desbureaux | 6383c44 | 2019-11-14 09:28:12 +0100 | [diff] [blame] | 103 | value: {{ index .Values "mariadb-galera" "service" "name" }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 104 | - name: VID_MYSQL_PORT |
Sylvain Desbureaux | 6383c44 | 2019-11-14 09:28:12 +0100 | [diff] [blame] | 105 | value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}" |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 106 | - name: VID_MYSQL_DBNAME |
Sylvain Desbureaux | 6383c44 | 2019-11-14 09:28:12 +0100 | [diff] [blame] | 107 | value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 108 | - name: VID_MYSQL_USER |
Krzysztof Opasiak | e3519ef | 2020-03-24 03:25:05 +0100 | [diff] [blame] | 109 | {{- 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] | 110 | - name: VID_MYSQL_PASS |
Krzysztof Opasiak | e3519ef | 2020-03-24 03:25:05 +0100 | [diff] [blame] | 111 | {{- 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] | 112 | - name: VID_MYSQL_MAXCONNECTIONS |
| 113 | value: "{{ .Values.config.vidmysqlmaxconnections }}" |
| 114 | volumeMounts: |
Bartosz Gardziejewski | 533bbdb | 2019-08-07 14:49:10 +0200 | [diff] [blame] | 115 | - mountPath: /opt/app/vid/etc |
| 116 | name: vid-certs |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 117 | - mountPath: /etc/localtime |
| 118 | name: localtime |
| 119 | readOnly: true |
| 120 | - mountPath: /var/log/onap |
| 121 | name: vid-logs |
| 122 | - mountPath: /tmp/logback.xml |
| 123 | name: vid-logback |
| 124 | subPath: logback.xml |
| 125 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 126 | {{ include "common.resources" . | indent 12 }} |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 127 | {{- if .Values.nodeSelector }} |
| 128 | nodeSelector: |
| 129 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 130 | {{- end -}} |
| 131 | {{- if .Values.affinity }} |
| 132 | affinity: |
| 133 | {{ toYaml .Values.affinity | indent 10 }} |
| 134 | {{- end }} |
| 135 | # side car containers |
| 136 | - name: filebeat-onap |
| 137 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 138 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 139 | volumeMounts: |
| 140 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 141 | name: filebeat-conf |
| 142 | subPath: filebeat.yml |
| 143 | - mountPath: /var/log/onap |
| 144 | name: vid-logs |
| 145 | - mountPath: /usr/share/filebeat/data |
| 146 | name: vid-data-filebeat |
| 147 | volumes: |
Bartosz Gardziejewski | 533bbdb | 2019-08-07 14:49:10 +0200 | [diff] [blame] | 148 | - name: vid-certs |
| 149 | secret: |
| 150 | secretName: {{ include "common.fullname" . }}-certs |
Priyanka | 5fdca02 | 2018-03-13 12:53:06 +0000 | [diff] [blame] | 151 | - name: localtime |
| 152 | hostPath: |
| 153 | path: /etc/localtime |
| 154 | - name: filebeat-conf |
| 155 | configMap: |
| 156 | name: {{ include "common.fullname" . }}-filebeat-configmap |
| 157 | - name: vid-logs |
| 158 | emptyDir: {} |
| 159 | - name: vid-data-filebeat |
| 160 | emptyDir: {} |
| 161 | - name: vid-logback |
| 162 | configMap: |
| 163 | name: {{ include "common.fullname" . }}-log-configmap |
| 164 | imagePullSecrets: |
| 165 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |