Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 2 | # Copyright © 2018 Amdocs, Bell Canada |
| 3 | # |
| 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. |
Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 15 | */}} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 16 | |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 17 | apiVersion: apps/v1 |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 18 | kind: Deployment |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 19 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 20 | spec: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 21 | selector: {{- include "common.selectors" . | nindent 4 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 22 | replicas: {{ .Values.replicaCount }} |
| 23 | template: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 24 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 25 | spec: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 26 | initContainers: |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 27 | - name: {{ include "common.name" . }}-readiness |
| 28 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 29 | - /app/ready.py |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 30 | args: |
| 31 | - --container-name |
| 32 | - "sdc-wfd-be" |
| 33 | env: |
| 34 | - name: NAMESPACE |
| 35 | valueFrom: |
| 36 | fieldRef: |
| 37 | apiVersion: v1 |
| 38 | fieldPath: metadata.namespace |
Sylvain Desbureaux | 0a1eaf3 | 2020-11-19 17:56:08 +0100 | [diff] [blame] | 39 | image: {{ include "repositoryGenerator.image.readiness" . }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 40 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 41 | resources: |
| 42 | limits: |
| 43 | cpu: 100m |
| 44 | memory: 100Mi |
| 45 | requests: |
| 46 | cpu: 3m |
| 47 | memory: 20Mi |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 48 | containers: |
| 49 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 0a1eaf3 | 2020-11-19 17:56:08 +0100 | [diff] [blame] | 50 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 51 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 52 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 53 | {{ if .Values.liveness.enabled }} |
| 54 | livenessProbe: |
| 55 | tcpSocket: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 56 | port: {{ .Values.service.internalPort }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 57 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 58 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Sylvain Desbureaux | 8c9416b | 2021-05-05 11:12:48 +0200 | [diff] [blame] | 59 | successThreshold: {{ .Values.liveness.successThreshold }} |
| 60 | failureThreshold: {{ .Values.liveness.failureThreshold }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 61 | {{ end }} |
| 62 | readinessProbe: |
| 63 | tcpSocket: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 64 | port: {{ .Values.service.internalPort }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 65 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 66 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Sylvain Desbureaux | 8c9416b | 2021-05-05 11:12:48 +0200 | [diff] [blame] | 67 | successThreshold: {{ .Values.readiness.successThreshold }} |
| 68 | failureThreshold: {{ .Values.readiness.failureThreshold }} |
| 69 | startupProbe: |
| 70 | tcpSocket: |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 71 | port: {{ .Values.service.internalPort }} |
Sylvain Desbureaux | 8c9416b | 2021-05-05 11:12:48 +0200 | [diff] [blame] | 72 | initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }} |
| 73 | periodSeconds: {{ .Values.startup.periodSeconds }} |
| 74 | successThreshold: {{ .Values.startup.successThreshold }} |
| 75 | failureThreshold: {{ .Values.startup.failureThreshold }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 76 | env: |
| 77 | - name: ENVNAME |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 78 | value: {{ .Values.env.name }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 79 | - name: JAVA_OPTIONS |
| 80 | value: {{ .Values.config.javaOptions }} |
| 81 | - name: BACKEND |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 82 | value: "{{ .Values.config.backendServerURL.http }}" |
dfx1971 | b2734ed | 2019-05-07 10:35:58 +0300 | [diff] [blame] | 83 | - name: IS_HTTPS |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 84 | value: "false" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 85 | volumeMounts: |
| 86 | - name: {{ include "common.fullname" . }}-localtime |
| 87 | mountPath: /etc/localtime |
| 88 | readOnly: true |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 89 | resources: {{ include "common.resources" . | nindent 12 }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 90 | {{- if .Values.nodeSelector }} |
| 91 | nodeSelector: |
| 92 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 93 | {{- end -}} |
| 94 | {{- if .Values.affinity }} |
| 95 | affinity: |
| 96 | {{ toYaml .Values.affinity | indent 10 }} |
| 97 | {{- end }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 98 | # side car containers |
Maciej Wereski | 771ec2a | 2021-10-14 13:59:12 +0000 | [diff] [blame] | 99 | {{ include "common.log.sidecar" . | nindent 8 }} |
farida azmy | 1383b4c | 2021-04-06 12:33:31 +0200 | [diff] [blame] | 100 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Andreas Geissler | dd34ead | 2023-03-20 17:16:45 +0100 | [diff] [blame] | 101 | volumes: |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 102 | - name: {{ include "common.fullname" . }}-localtime |
| 103 | hostPath: |
| 104 | path: /etc/localtime |
Maciej Wereski | 771ec2a | 2021-10-14 13:59:12 +0000 | [diff] [blame] | 105 | {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} |
| 106 | - name: logs |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 107 | emptyDir: {} |
| 108 | imagePullSecrets: |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 109 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |