Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 1 | # Copyright © 2018 Orange |
Prateekinlinux | 445a18e | 2018-08-01 06:48:33 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Amdocs, Bell Canada |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [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" . }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [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" . }} |
Sylvain Desbureaux | 1d061a4 | 2019-11-08 15:27:20 +0100 | [diff] [blame] | 33 | name: {{ include "common.fullname" . }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 34 | spec: |
| 35 | containers: |
| 36 | - name: {{ include "common.name" . }} |
| 37 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 38 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 39 | ports: |
| 40 | - containerPort: {{ .Values.service.internalPort }} |
| 41 | # disable liveness probe when breakpoints set in debugger |
| 42 | # so K8s doesn't restart unresponsive container |
| 43 | {{ if .Values.liveness.enabled }} |
| 44 | livenessProbe: |
| 45 | tcpSocket: |
| 46 | port: {{ .Values.service.internalPort }} |
| 47 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 48 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 49 | {{ end }} |
| 50 | readinessProbe: |
| 51 | tcpSocket: |
| 52 | port: {{ .Values.service.internalPort }} |
| 53 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 54 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 55 | env: |
| 56 | - name: SPRING_DATASOURCE_URL |
Sylvain Desbureaux | 1d061a4 | 2019-11-08 15:27:20 +0100 | [diff] [blame] | 57 | value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 58 | - name: SPRING_DATASOURCE_USERNAME |
Sylvain Desbureaux | 9e851c6 | 2019-10-28 15:52:05 +0100 | [diff] [blame] | 59 | value: {{ index .Values "mariadb-galera" "config" "userName" }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 60 | - name: SPRING_DATASOURCE_PASSWORD |
| 61 | valueFrom: |
| 62 | secretKeyRef: |
Sylvain Desbureaux | 1d061a4 | 2019-11-08 15:27:20 +0100 | [diff] [blame] | 63 | name: {{ include "common.mariadbSecret" . }} |
| 64 | key: {{ include "common.mariadbSecretParam" . }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 65 | - name: SPRING_DATA_MONGODB_HOST |
| 66 | value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }} |
| 67 | - name: SPRING_DATA_MONGODB_PORT |
| 68 | value: "{{ .Values.mongo.service.internalPort }}" |
| 69 | - name: SPRING_DATA_MONGODB_DATABASE |
| 70 | value: {{ .Values.mongo.config.dbName }} |
| 71 | - name: ONAP_LCPCLOUDREGIONID |
| 72 | value: {{ .Values.config.openStackRegion }} |
| 73 | - name: ONAP_TENANTID |
Sylvain Desbureaux | 33f8367 | 2018-06-01 14:28:39 +0200 | [diff] [blame] | 74 | value: {{ .Values.config.openStackVNFTenantId | quote }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 75 | - name: ONAP_CLOUDOWNER |
| 76 | value: {{ .Values.config.cloudOwner }} |
| 77 | - name: NBI_URL |
mrichomme | ad2dd83 | 2019-05-16 18:29:03 +0200 | [diff] [blame] | 78 | value: "http://nbi.{{ include "common.namespace" . }}:8080/nbi/api/v4" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 79 | - name: SDC_HOST |
Matthieu Geerebaert | 3dc7082 | 2019-11-06 16:57:49 +0100 | [diff] [blame] | 80 | value: "https://sdc-be.{{ include "common.namespace" . }}:8443" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 81 | - name: SDC_HEADER_ECOMPINSTANCEID |
| 82 | value: {{ .Values.config.ecompInstanceId }} |
| 83 | - name: SDC_HEADER_AUTHORIZATION |
| 84 | value: {{ .Values.sdc_authorization }} |
| 85 | - name: AAI_HOST |
Eric Debeau | b030765 | 2018-05-22 06:43:39 +0000 | [diff] [blame] | 86 | value: "https://aai.{{ include "common.namespace" . }}:8443" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 87 | - name: AAI_HEADER_AUTHORIZATION |
| 88 | value: {{ .Values.aai_authorization }} |
| 89 | - name: SO_HOST |
| 90 | value: http://so.{{ include "common.namespace" . }}:8080 |
| 91 | {{- if .Values.so_authorization }} |
| 92 | - name: SO_HEADER_AUTHORIZATION |
| 93 | value: {{ .Values.so_authorization }} |
| 94 | {{- end }} |
aosull01 | 4a11955 | 2019-03-14 15:15:49 +0000 | [diff] [blame] | 95 | - name: DMAAP_HOST |
MatthieuGeerebaert | 197c869 | 2019-12-11 09:07:17 +0100 | [diff] [blame] | 96 | value: "https://message-router.{{ include "common.namespace" . }}:3905" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 97 | - name: LOGGING_LEVEL_ORG_ONAP_NBI |
| 98 | value: {{ .Values.config.loglevel }} |
Quoc Nghia Nguyen | dd0b365 | 2018-09-17 22:28:28 +0200 | [diff] [blame] | 99 | - name: MSB_ENABLED |
| 100 | value: "true" |
| 101 | - name: MSB_DISCOVERY_HOST |
| 102 | value: "msb-discovery.{{ include "common.namespace" . }}" |
| 103 | - name: MSB_DISCOVERY_PORT |
| 104 | value: "10081" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 105 | volumeMounts: |
| 106 | - mountPath: /etc/localtime |
| 107 | name: localtime |
| 108 | readOnly: true |
| 109 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 110 | {{ include "common.resources" . | indent 12 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 111 | {{- if .Values.nodeSelector }} |
| 112 | nodeSelector: |
| 113 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 114 | {{- end -}} |
| 115 | {{- if .Values.affinity }} |
| 116 | affinity: |
| 117 | {{ toYaml .Values.affinity | indent 10 }} |
| 118 | {{- end }} |
| 119 | # side car containers |
| 120 | # - name: filebeat-onap |
| 121 | # image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 122 | # imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 123 | # volumeMounts: |
| 124 | # - mountPath: /usr/share/filebeat/filebeat.yml |
| 125 | # name: filebeat-conf |
| 126 | # subPath: filebeat.yml |
| 127 | # - mountPath: /home/esr/works/logs |
| 128 | # name: esr-server-logs |
| 129 | # - mountPath: /usr/share/filebeat/data |
| 130 | # name: esr-server-filebeat |
| 131 | volumes: |
| 132 | - name: localtime |
| 133 | hostPath: |
| 134 | path: /etc/localtime |
| 135 | # - name: filebeat-conf |
| 136 | # configMap: |
| 137 | # name: {{ include "common.fullname" . }}-esr-filebeat |
| 138 | # - name: esr-server-logs |
| 139 | # emptyDir: {} |
| 140 | # - name: esr-server-filebeat |
| 141 | # emptyDir: {} |
| 142 | # - name: esrserver-log |
| 143 | # configMap: |
| 144 | # name: {{ include "common.fullname" . }}-esr-esrserver-log |
| 145 | imagePullSecrets: |
| 146 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |