blob: c328644122341e474093a10521545cb3a57e98dd [file] [log] [blame]
Donald Hunter3d8330a2018-09-14 13:48:08 +01001# ================================================================================
2# Copyright (c) 2018 Cisco Systems. All rights reserved.
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.
15# ============LICENSE_END=========================================================
16
17apiVersion: extensions/v1beta1
18kind: Deployment
19metadata:
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
Donald Hunter3d8330a2018-09-14 13:48:08 +010026 heritage: {{ .Release.Service }}
27spec:
28 replicas: 1
29 template:
30 metadata:
31 labels:
32 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010033 release: {{ include "common.release" . }}
Donald Hunter3d8330a2018-09-14 13:48:08 +010034 spec:
35 containers:
36 - name: {{ include "common.name" . }}
37 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
38 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 ports:
40 - containerPort: {{ .Values.service.internalPort }}
41 # disable liveness probe when breakpoints set in debugger
42 # so K8s doesn't restart unresponsive container
43 {{- if eq .Values.liveness.enabled true }}
44 livenessProbe:
45 tcpSocket:
46 port: {{ .Values.service.internalPort }}
47 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
48 periodSeconds: {{ .Values.liveness.periodSeconds }}
49 {{ end -}}
50 readinessProbe:
51 tcpSocket:
52 port: {{ .Values.service.internalPort }}
53 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
54 periodSeconds: {{ .Values.readiness.periodSeconds }}