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