Merge "[CONSUL] Add limits to consul chart."
[oom.git] / kubernetes / pnda / charts / dcae-pnda-mirror / templates / deployment.yaml
1 {{/*
2 # ================================================================================
3 # Copyright (c) 2018 Cisco Systems. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ============LICENSE_END=========================================================
17 */}}
18
19 apiVersion: extensions/v1beta1
20 kind: Deployment
21 metadata:
22   name: {{ include "common.fullname" . }}
23   namespace: {{ include "common.namespace" . }}
24   labels:
25     app: {{ include "common.name" . }}
26     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27     release: {{ include "common.release" . }}
28     heritage: {{ .Release.Service }}
29 spec:
30   replicas: 1
31   template:
32     metadata:
33       labels:
34         app: {{ include "common.name" . }}
35         release: {{ include "common.release" . }}
36     spec:
37       containers:
38         - name: {{ include "common.name" . }}
39           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
40           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
41           ports:
42             - containerPort: {{ .Values.service.internalPort }}
43           # disable liveness probe when breakpoints set in debugger
44           # so K8s doesn't restart unresponsive container
45           {{- if eq .Values.liveness.enabled true }}
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 }}