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