Jakub Latusek | 544ded2 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
Nishukumar | 376ba1e | 2018-08-03 09:17:23 +0000 | [diff] [blame] | 3 | # Modifications Copyright © 2018 AT&T,VMware |
krishnaa96 | 9940613 | 2020-09-24 20:39:49 +0530 | [diff] [blame] | 4 | # Modifications Copyright (C) 2020 Wipro Limited. |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Jakub Latusek | 544ded2 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 17 | */}} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 18 | |
Grzegorz-Lis | 7a152ac | 2020-07-30 11:55:24 +0200 | [diff] [blame] | 19 | apiVersion: apps/v1 |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 20 | kind: Deployment |
Andreas Geissler | 0fcefb6 | 2023-02-20 12:00:42 +0100 | [diff] [blame^] | 21 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 22 | spec: |
Andreas Geissler | 0fcefb6 | 2023-02-20 12:00:42 +0100 | [diff] [blame^] | 23 | selector: {{- include "common.selectors" . | nindent 4 }} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 24 | replicas: {{ .Values.replicaCount }} |
| 25 | template: |
Andreas Geissler | 0fcefb6 | 2023-02-20 12:00:42 +0100 | [diff] [blame^] | 26 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 27 | spec: |
| 28 | initContainers: |
Andreas Geissler | 0fcefb6 | 2023-02-20 12:00:42 +0100 | [diff] [blame^] | 29 | {{ include "common.readinessCheck.waitFor" . | nindent 6 }} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 30 | containers: |
| 31 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 01c711e | 2020-11-21 21:47:01 +0100 | [diff] [blame] | 32 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 33 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
krishnaa96 | 24a7ef3 | 2020-10-09 12:01:05 +0530 | [diff] [blame] | 34 | command: |
| 35 | - /bin/sh |
| 36 | args: |
| 37 | - "-c" |
| 38 | - | |
krishnaa96 | 07fc3ea | 2021-08-02 11:19:16 +0530 | [diff] [blame] | 39 | python osdfapp.py |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 40 | ports: |
| 41 | - containerPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 0fcefb6 | 2023-02-20 12:00:42 +0100 | [diff] [blame^] | 42 | name: http |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 43 | # disable liveness probe when breakpoints set in debugger |
| 44 | # so K8s doesn't restart unresponsive container |
| 45 | {{- if .Values.liveness.enabled }} |
| 46 | livenessProbe: |
| 47 | tcpSocket: |
| 48 | port: {{ .Values.service.internalPort }} |
| 49 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 50 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 51 | {{ end -}} |
| 52 | readinessProbe: |
| 53 | tcpSocket: |
| 54 | port: {{ .Values.service.internalPort }} |
| 55 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 56 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 57 | env: |
| 58 | volumeMounts: |
| 59 | - mountPath: /etc/localtime |
| 60 | name: localtime |
| 61 | readOnly: true |
Krzysztof Opasiak | 1cddd1d | 2020-04-16 20:06:50 +0200 | [diff] [blame] | 62 | - mountPath: /opt/osdf/config/osdf_config.yaml |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 63 | name: {{ include "common.fullname" . }}-config |
| 64 | subPath: osdf_config.yaml |
vrvarma | 8f50049 | 2019-04-25 23:08:01 -0400 | [diff] [blame] | 65 | - mountPath: /opt/osdf/config/common_config.yaml |
| 66 | name: {{ include "common.fullname" . }}-config |
| 67 | subPath: common_config.yaml |
krishnaa96 | 9940613 | 2020-09-24 20:39:49 +0530 | [diff] [blame] | 68 | - mountPath: /opt/osdf/config/log.yml |
| 69 | name: {{ include "common.fullname" . }}-config |
| 70 | subPath: log.yml |
Lukasz Rajewski | d741772 | 2021-07-28 17:12:14 +0200 | [diff] [blame] | 71 | - mountPath: /opt/osdf/config/slicing_config.yaml |
| 72 | name: {{ include "common.fullname" . }}-config |
| 73 | subPath: slicing_config.yaml |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 74 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 75 | {{ include "common.resources" . | indent 12 }} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 76 | {{- if .Values.nodeSelector }} |
| 77 | nodeSelector: |
| 78 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 79 | {{- end -}} |
| 80 | {{- if .Values.affinity }} |
| 81 | affinity: |
| 82 | {{ toYaml .Values.affinity | indent 10 }} |
| 83 | {{- end }} |
farida azmy | b3e25ca | 2021-10-27 15:56:35 +0200 | [diff] [blame] | 84 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 85 | volumes: |
| 86 | - name: localtime |
| 87 | hostPath: |
| 88 | path: /etc/localtime |
| 89 | - name: {{ include "common.fullname" . }}-config |
| 90 | configMap: |
| 91 | name: {{ include "common.fullname" . }}-configmap |
| 92 | items: |
| 93 | - key: osdf_config.yaml |
| 94 | path: osdf_config.yaml |
vrvarma | 8f50049 | 2019-04-25 23:08:01 -0400 | [diff] [blame] | 95 | - key: common_config.yaml |
| 96 | path: common_config.yaml |
krishnaa96 | 9940613 | 2020-09-24 20:39:49 +0530 | [diff] [blame] | 97 | - key: log.yml |
| 98 | path: log.yml |
Lukasz Rajewski | d741772 | 2021-07-28 17:12:14 +0200 | [diff] [blame] | 99 | - key: slicing_config.yaml |
| 100 | path: slicing_config.yaml |
Ikram Ikramullah | 40b120b | 2018-05-01 11:35:40 -0400 | [diff] [blame] | 101 | imagePullSecrets: |
| 102 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |