Jakub Latusek | 922465c | 2020-09-16 12:42:00 +0200 | [diff] [blame] | 1 | {{/* |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 2 | # Copyright © 2018 Orange |
Prateekinlinux | 445a18e | 2018-08-01 06:48:33 +0000 | [diff] [blame] | 3 | # Modifications Copyright © 2018 Amdocs, Bell Canada |
Grzegorz-Lis | b97c60a | 2020-07-29 12:36:06 +0200 | [diff] [blame] | 4 | # Modifications Copyright © 2020 Nokia |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Jakub Latusek | 922465c | 2020-09-16 12:42:00 +0200 | [diff] [blame] | 17 | */}} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 18 | |
Grzegorz-Lis | b97c60a | 2020-07-29 12:36:06 +0200 | [diff] [blame] | 19 | apiVersion: apps/v1 |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 20 | kind: Deployment |
Andreas Geissler | b19c851 | 2022-10-13 13:15:29 +0200 | [diff] [blame] | 21 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 22 | spec: |
Andreas Geissler | b19c851 | 2022-10-13 13:15:29 +0200 | [diff] [blame] | 23 | selector: {{- include "common.selectors" . | nindent 4 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 24 | replicas: {{ .Values.replicaCount }} |
| 25 | template: |
Andreas Geissler | b19c851 | 2022-10-13 13:15:29 +0200 | [diff] [blame] | 26 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 27 | spec: |
| 28 | containers: |
| 29 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | e79bbc5 | 2020-11-21 22:06:57 +0100 | [diff] [blame] | 30 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 31 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | b19c851 | 2022-10-13 13:15:29 +0200 | [diff] [blame] | 32 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 33 | # disable liveness probe when breakpoints set in debugger |
| 34 | # so K8s doesn't restart unresponsive container |
| 35 | {{ if .Values.liveness.enabled }} |
| 36 | livenessProbe: |
Sylvain Desbureaux | d82050c | 2020-03-17 10:43:40 +0100 | [diff] [blame] | 37 | httpGet: |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 38 | port: {{ .Values.service.internalPort }} |
Sylvain Desbureaux | d82050c | 2020-03-17 10:43:40 +0100 | [diff] [blame] | 39 | path: {{ .Values.liveness.path }} |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 40 | scheme: HTTP |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 41 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 42 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 43 | {{ end }} |
| 44 | readinessProbe: |
Sylvain Desbureaux | d82050c | 2020-03-17 10:43:40 +0100 | [diff] [blame] | 45 | httpGet: |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 46 | port: {{ .Values.service.internalPort }} |
Sylvain Desbureaux | d82050c | 2020-03-17 10:43:40 +0100 | [diff] [blame] | 47 | path: {{ .Values.readiness.path }} |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 48 | scheme: HTTP |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 49 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 50 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 51 | env: |
| 52 | - name: SPRING_DATASOURCE_URL |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 53 | value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "db" "name" }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 54 | - name: SPRING_DATASOURCE_USERNAME |
Krzysztof Opasiak | 783fabf | 2020-03-24 03:26:45 +0100 | [diff] [blame] | 55 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 56 | - name: SPRING_DATASOURCE_PASSWORD |
Krzysztof Opasiak | 783fabf | 2020-03-24 03:26:45 +0100 | [diff] [blame] | 57 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 58 | - name: SPRING_DATA_MONGODB_HOST |
| 59 | value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }} |
| 60 | - name: SPRING_DATA_MONGODB_PORT |
| 61 | value: "{{ .Values.mongo.service.internalPort }}" |
| 62 | - name: SPRING_DATA_MONGODB_DATABASE |
| 63 | value: {{ .Values.mongo.config.dbName }} |
| 64 | - name: ONAP_LCPCLOUDREGIONID |
| 65 | value: {{ .Values.config.openStackRegion }} |
| 66 | - name: ONAP_TENANTID |
Sylvain Desbureaux | 33f8367 | 2018-06-01 14:28:39 +0200 | [diff] [blame] | 67 | value: {{ .Values.config.openStackVNFTenantId | quote }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 68 | - name: ONAP_CLOUDOWNER |
| 69 | value: {{ .Values.config.cloudOwner }} |
aleemraja | 40149d8 | 2020-10-16 17:48:17 +0530 | [diff] [blame] | 70 | - name: ONAP_K8SCLOUDREGIONID |
| 71 | value: {{ .Values.config.k8sCloudRegionId }} |
| 72 | - name: ONAP_K8SCLOUDOWNER |
| 73 | value: {{ .Values.config.k8sCloudOwner }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 74 | - name: NBI_URL |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 75 | value: "http://nbi.{{ include "common.namespace" . }}:{{ .Values.service.internalPort }}/nbi/api/v4" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 76 | - name: SDC_HOST |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 77 | value: "http://sdc-be.{{ include "common.namespace" . }}:8080" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 78 | - name: SDC_HEADER_ECOMPINSTANCEID |
| 79 | value: {{ .Values.config.ecompInstanceId }} |
| 80 | - name: SDC_HEADER_AUTHORIZATION |
| 81 | value: {{ .Values.sdc_authorization }} |
| 82 | - name: AAI_HOST |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 83 | value: "http://aai.{{ include "common.namespace" . }}:80" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 84 | - name: AAI_HEADER_AUTHORIZATION |
| 85 | value: {{ .Values.aai_authorization }} |
| 86 | - name: SO_HOST |
| 87 | value: http://so.{{ include "common.namespace" . }}:8080 |
| 88 | {{- if .Values.so_authorization }} |
| 89 | - name: SO_HEADER_AUTHORIZATION |
| 90 | value: {{ .Values.so_authorization }} |
| 91 | {{- end }} |
aosull01 | 4a11955 | 2019-03-14 15:15:49 +0000 | [diff] [blame] | 92 | - name: DMAAP_HOST |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 93 | value: "http://message-router.{{ include "common.namespace" . }}:3904" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 94 | - name: LOGGING_LEVEL_ORG_ONAP_NBI |
| 95 | value: {{ .Values.config.loglevel }} |
Quoc Nghia Nguyen | dd0b365 | 2018-09-17 22:28:28 +0200 | [diff] [blame] | 96 | - name: MSB_ENABLED |
Andreas Geissler | b19c851 | 2022-10-13 13:15:29 +0200 | [diff] [blame] | 97 | value: "{{ .Values.global.msbEnabled }}" |
Quoc Nghia Nguyen | dd0b365 | 2018-09-17 22:28:28 +0200 | [diff] [blame] | 98 | - name: MSB_DISCOVERY_HOST |
| 99 | value: "msb-discovery.{{ include "common.namespace" . }}" |
| 100 | - name: MSB_DISCOVERY_PORT |
| 101 | value: "10081" |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 102 | volumeMounts: |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 103 | - mountPath: /etc/localtime |
| 104 | name: localtime |
| 105 | readOnly: true |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 106 | resources: {{ include "common.resources" . | nindent 12 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 107 | {{- if .Values.nodeSelector }} |
| 108 | nodeSelector: |
| 109 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 110 | {{- end -}} |
| 111 | {{- if .Values.affinity }} |
| 112 | affinity: |
| 113 | {{ toYaml .Values.affinity | indent 10 }} |
| 114 | {{- end }} |
farida azmy | 37c9876 | 2021-10-18 13:06:52 +0200 | [diff] [blame] | 115 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Andreas Geissler | 638330d | 2023-03-20 15:24:36 +0100 | [diff] [blame] | 116 | volumes: |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 117 | - name: localtime |
| 118 | hostPath: |
| 119 | path: /etc/localtime |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 120 | imagePullSecrets: |
| 121 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |