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 |
| 20 | metadata: |
| 21 | name: {{ include "common.fullname" . }} |
| 22 | namespace: {{ include "common.namespace" . }} |
| 23 | labels: |
| 24 | app: {{ include "common.name" . }} |
| 25 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | spec: |
Grzegorz-Lis | 9bd9878 | 2020-07-27 15:22:28 +0200 | [diff] [blame] | 29 | selector: |
| 30 | matchLabels: |
| 31 | app: {{ include "common.name" . }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 32 | replicas: {{ .Values.replicaCount }} |
| 33 | template: |
| 34 | metadata: |
| 35 | labels: |
| 36 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 37 | release: {{ include "common.release" . }} |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 38 | name: {{ include "common.fullname" . }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 39 | spec: |
Sylvain Desbureaux | 1d7647e | 2021-02-08 15:29:05 +0100 | [diff] [blame] | 40 | {{- if .Values.global.aafEnabled }} |
| 41 | initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }} |
| 42 | {{- end }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 43 | containers: |
| 44 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 503b229 | 2020-11-21 22:29:17 +0100 | [diff] [blame] | 45 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 46 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 47 | ports: |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 48 | - containerPort: {{ .Values.service.internalPort }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 49 | # disable liveness probe when breakpoints set in debugger |
| 50 | # so K8s doesn't restart unresponsive container |
| 51 | {{ if .Values.liveness.enabled }} |
| 52 | livenessProbe: |
| 53 | tcpSocket: |
| 54 | port: {{ .Values.service.internalPort }} |
| 55 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 56 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 57 | {{ end }} |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 58 | env: |
| 59 | - name: HOST |
| 60 | value: 0.0.0.0 |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 61 | - name: APP_ACTION_DEPLOY_BLUEPRINT_GRPC_ENABLED |
Timoney, Dan (dt5972) | 6c65631 | 2019-07-11 14:54:28 -0400 | [diff] [blame] | 62 | value: "{{ .Values.config.app.action.deployBlueprint.grpcEnabled }}" |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 63 | - name: API_BLUEPRINT_CONTROLLER_HTTP_BASE_URL |
| 64 | value: {{ .Values.config.api.controller.http.baseUrl }} |
| 65 | - name: API_BLUEPRINT_CONTROLLER_HTTP_AUTH_TOKEN |
| 66 | value: {{ .Values.config.api.controller.http.authToken }} |
Oleg Mitsura | 679b758 | 2019-11-21 12:39:02 -0500 | [diff] [blame] | 67 | - name: API_BLUEPRINT_PROCESSOR_HTTP_BASE_URL |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 68 | value: {{ .Values.config.api.processor.http.baseUrl }} |
| 69 | - name: API_BLUEPRINT_PROCESSOR_HTTP_AUTH_TOKEN |
| 70 | value: {{ .Values.config.api.processor.http.authToken }} |
| 71 | - name: API_BLUEPRINT_PROCESSOR_GRPC_HOST |
| 72 | value: {{ .Values.config.api.processor.grpc.host }} |
| 73 | - name: API_BLUEPRINT_PROCESSOR_GRPC_PORT |
Timoney, Dan (dt5972) | 6c65631 | 2019-07-11 14:54:28 -0400 | [diff] [blame] | 74 | value: "{{ .Values.config.api.processor.grpc.port }}" |
Nirvan Ramjuttun | 4603e7e | 2019-05-30 14:26:27 -0400 | [diff] [blame] | 75 | - name: API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN |
| 76 | value: {{ .Values.config.api.processor.grpc.authToken }} |
Sylvain Desbureaux | 1d7647e | 2021-02-08 15:29:05 +0100 | [diff] [blame] | 77 | {{- if .Values.global.aafEnabled }} |
| 78 | - name: KEYSTORE |
| 79 | value: "{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.fqi_namespace }}.p12" |
| 80 | - name: PASSPHRASE |
| 81 | value: "{{ .Values.certInitializer.credsPath }}/mycreds.prop" |
| 82 | {{- end }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 83 | readinessProbe: |
| 84 | tcpSocket: |
| 85 | port: {{ .Values.service.internalPort }} |
| 86 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 87 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Sylvain Desbureaux | 1d7647e | 2021-02-08 15:29:05 +0100 | [diff] [blame] | 88 | volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 12 }} |
Sylvain Desbureaux | 7acab56 | 2019-03-01 09:26:13 +0100 | [diff] [blame] | 89 | - mountPath: /etc/localtime |
| 90 | name: localtime |
| 91 | readOnly: true |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 92 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 93 | {{ include "common.resources" . | indent 12 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 94 | {{- if .Values.nodeSelector }} |
| 95 | nodeSelector: |
| 96 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 97 | {{- end -}} |
| 98 | {{- if .Values.affinity }} |
| 99 | affinity: |
| 100 | {{ toYaml .Values.affinity | indent 10 }} |
| 101 | {{- end }} |
Sylvain Desbureaux | 1d7647e | 2021-02-08 15:29:05 +0100 | [diff] [blame] | 102 | volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }} |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 103 | - name: localtime |
| 104 | hostPath: |
| 105 | path: /etc/localtime |
Mike Elliott | 37cae25 | 2018-09-12 14:45:40 -0400 | [diff] [blame] | 106 | imagePullSecrets: |
| 107 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |