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 |
Andreas Geissler | cde4a78 | 2024-02-28 16:08:06 +0100 | [diff] [blame] | 59 | value: {{ .Values.mongodb.service.nameOverride }}.{{ include "common.namespace" . }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 60 | - name: SPRING_DATA_MONGODB_PORT |
Andreas Geissler | cde4a78 | 2024-02-28 16:08:06 +0100 | [diff] [blame] | 61 | value: "{{ .Values.mongodb.service.port }}" |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 62 | - name: SPRING_DATA_MONGODB_DATABASE |
Andreas Geissler | cde4a78 | 2024-02-28 16:08:06 +0100 | [diff] [blame] | 63 | value: {{ .Values.mongodb.config.dbName }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 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" |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 102 | resources: {{ include "common.resources" . | nindent 12 }} |
Sylvain Desbureaux | e44d170 | 2018-05-07 20:39:16 +0200 | [diff] [blame] | 103 | {{- if .Values.nodeSelector }} |
| 104 | nodeSelector: |
| 105 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 106 | {{- end -}} |
| 107 | {{- if .Values.affinity }} |
| 108 | affinity: |
| 109 | {{ toYaml .Values.affinity | indent 10 }} |
| 110 | {{- end }} |
farida azmy | 37c9876 | 2021-10-18 13:06:52 +0200 | [diff] [blame] | 111 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame] | 112 | {{- include "common.imagePullSecrets" . | nindent 6 }} |