vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 23 | release: {{ include "common.release" . }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 31 | release: {{ include "common.release" . }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 32 | spec: |
| 33 | initContainers: |
| 34 | #Example init container for dependency checking |
| 35 | # - command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 36 | # - /app/ready.py |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 37 | # args: |
| 38 | # - --container-name |
| 39 | # - mariadb |
| 40 | # env: |
| 41 | # - name: NAMESPACE |
| 42 | # valueFrom: |
| 43 | # fieldRef: |
| 44 | # apiVersion: v1 |
| 45 | # fieldPath: metadata.namespace |
Sylvain Desbureaux | 6027f26 | 2020-11-21 22:40:19 +0100 | [diff] [blame] | 46 | # image: {{ include "repositoryGenerator.image.readiness" . }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 47 | # imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 48 | # name: {{ include "common.name" . }}-readiness |
| 49 | containers: |
| 50 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 6027f26 | 2020-11-21 22:40:19 +0100 | [diff] [blame] | 51 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 52 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 53 | ports: |
| 54 | - containerPort: {{ .Values.service.internalPort }} |
| 55 | # disable liveness probe when breakpoints set in debugger |
| 56 | # so K8s doesn't restart unresponsive container |
Mike Elliott | 14d6eae | 2018-04-15 10:39:41 -0400 | [diff] [blame] | 57 | {{ if .Values.liveness.enabled }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 58 | livenessProbe: |
| 59 | tcpSocket: |
| 60 | port: {{ .Values.service.internalPort }} |
| 61 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 62 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Mike Elliott | 14d6eae | 2018-04-15 10:39:41 -0400 | [diff] [blame] | 63 | {{ end }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 64 | readinessProbe: |
| 65 | tcpSocket: |
| 66 | port: {{ .Values.service.internalPort }} |
| 67 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 68 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 69 | env: |
| 70 | #Example environment variable passed to container |
| 71 | # - name: DEBUG_FLAG |
| 72 | # value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }} |
| 73 | volumeMounts: |
| 74 | - mountPath: /etc/localtime |
| 75 | name: localtime |
| 76 | readOnly: true |
| 77 | #Example config file mount into container |
| 78 | # - mountPath: /opt/app/application.properties |
| 79 | # name: {{ include "common.name" . }}-config |
| 80 | # subPath: application.properties |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 81 | resources: {{ include "common.resources" . | nindent 12 }} |
Mike Elliott | 282a387 | 2018-02-28 09:55:14 -0500 | [diff] [blame] | 82 | {{- if .Values.nodeSelector }} |
| 83 | nodeSelector: |
| 84 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 85 | {{- end -}} |
| 86 | {{- if .Values.affinity }} |
| 87 | affinity: |
| 88 | {{ toYaml .Values.affinity | indent 10 }} |
| 89 | {{- end }} |
| 90 | |
| 91 | volumes: |
| 92 | - name: localtime |
| 93 | hostPath: |
| 94 | path: /etc/localtime |
| 95 | #Example config file mount into container |
| 96 | # - name: {{ include "common.fullname" . }}-config |
| 97 | # configMap: |
| 98 | # name: {{ include "common.fullname" . }}-configmap |
| 99 | # items: |
| 100 | # - key: application.properties |
| 101 | # path: application.properties |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame] | 102 | {{- include "common.imagePullSecrets" . | nindent 6 }} |