Jakub Latusek | 5053076 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 2 | # Copyright © 2018 Orange |
| 3 | # Modifications Copyright © 2018 Amdocs, Bell Canada |
Steve Alphonse Siani | e20fd5e | 2019-01-25 16:16:29 -0500 | [diff] [blame] | 4 | # |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Jakub Latusek | 5053076 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 16 | */}} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 17 | |
Grzegorz-Lis | 9bd9878 | 2020-07-27 15:22:28 +0200 | [diff] [blame] | 18 | apiVersion: apps/v1 |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 19 | kind: Deployment |
Andreas Geissler | 11fcd6c | 2023-05-25 14:33:16 +0200 | [diff] [blame] | 20 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 21 | spec: |
| 22 | replicas: {{ .Values.replicaCount }} |
Andreas Geissler | 11fcd6c | 2023-05-25 14:33:16 +0200 | [diff] [blame] | 23 | selector: {{- include "common.selectors" . | nindent 4 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 24 | template: |
Andreas Geissler | 11fcd6c | 2023-05-25 14:33:16 +0200 | [diff] [blame] | 25 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 26 | spec: |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 27 | containers: |
| 28 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 503b229 | 2020-11-21 22:29:17 +0100 | [diff] [blame] | 29 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 30 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | 11fcd6c | 2023-05-25 14:33:16 +0200 | [diff] [blame] | 31 | ports: {{- include "common.containerPorts" . | nindent 12 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 32 | # disable liveness probe when breakpoints set in debugger |
| 33 | # so K8s doesn't restart unresponsive container |
| 34 | {{ if .Values.liveness.enabled }} |
| 35 | livenessProbe: |
| 36 | tcpSocket: |
| 37 | port: {{ .Values.service.internalPort }} |
| 38 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 39 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 40 | {{ end }} |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 41 | env: |
| 42 | - name: HOST |
| 43 | value: 0.0.0.0 |
Lukasz Rajewski | b5e2850 | 2023-10-02 17:04:40 +0200 | [diff] [blame^] | 44 | - name: PROTOCOL |
| 45 | value: "{{ .Values.config.env.protocol }}" |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 46 | - name: APP_ACTION_DEPLOY_BLUEPRINT_GRPC_ENABLED |
Timoney, Dan (dt5972) | 6c65631 | 2019-07-11 14:54:28 -0400 | [diff] [blame] | 47 | value: "{{ .Values.config.app.action.deployBlueprint.grpcEnabled }}" |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 48 | - name: API_BLUEPRINT_CONTROLLER_HTTP_BASE_URL |
| 49 | value: {{ .Values.config.api.controller.http.baseUrl }} |
| 50 | - name: API_BLUEPRINT_CONTROLLER_HTTP_AUTH_TOKEN |
| 51 | value: {{ .Values.config.api.controller.http.authToken }} |
Oleg Mitsura | 679b758 | 2019-11-21 12:39:02 -0500 | [diff] [blame] | 52 | - name: API_BLUEPRINT_PROCESSOR_HTTP_BASE_URL |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 53 | value: {{ .Values.config.api.processor.http.baseUrl }} |
| 54 | - name: API_BLUEPRINT_PROCESSOR_HTTP_AUTH_TOKEN |
| 55 | value: {{ .Values.config.api.processor.http.authToken }} |
| 56 | - name: API_BLUEPRINT_PROCESSOR_GRPC_HOST |
| 57 | value: {{ .Values.config.api.processor.grpc.host }} |
| 58 | - name: API_BLUEPRINT_PROCESSOR_GRPC_PORT |
Timoney, Dan (dt5972) | 6c65631 | 2019-07-11 14:54:28 -0400 | [diff] [blame] | 59 | value: "{{ .Values.config.api.processor.grpc.port }}" |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 60 | - name: API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN |
| 61 | value: {{ .Values.config.api.processor.grpc.authToken }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 62 | readinessProbe: |
| 63 | tcpSocket: |
| 64 | port: {{ .Values.service.internalPort }} |
| 65 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 66 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Andreas Geissler | 11fcd6c | 2023-05-25 14:33:16 +0200 | [diff] [blame] | 67 | volumeMounts: |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 68 | - mountPath: /etc/localtime |
| 69 | name: localtime |
| 70 | readOnly: true |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 71 | resources: {{ include "common.resources" . | nindent 12 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 72 | {{- if .Values.nodeSelector }} |
| 73 | nodeSelector: |
| 74 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 75 | {{- end -}} |
| 76 | {{- if .Values.affinity }} |
| 77 | affinity: |
| 78 | {{ toYaml .Values.affinity | indent 10 }} |
| 79 | {{- end }} |
farida azmy | ffad032 | 2021-04-09 14:18:14 +0200 | [diff] [blame] | 80 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Andreas Geissler | 11fcd6c | 2023-05-25 14:33:16 +0200 | [diff] [blame] | 81 | volumes: |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 82 | - name: localtime |
| 83 | hostPath: |
| 84 | path: /etc/localtime |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 85 | imagePullSecrets: |
| 86 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |