Repository navigation
Expand file tree
/
Copy pathexample-template.yaml
More file actions
57 lines (57 loc) · 1.88 KB
/
Copy pathexample-template.yaml
File metadata and controls
57 lines (57 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.name }}
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.name }}
version: {{ .Values.image.tag }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.name }}
template:
metadata:
labels:
app: {{ .Values.name }}
version: {{ .Values.image.tag }}
spec:
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- end }}
containers:
- name: {{ .Values.name }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.env }}
env:
{{- range $key, $val := .Values.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
cpu: {{ .Values.resources.requests.cpu | default "100m" }}
memory: {{ .Values.resources.requests.memory | default "128Mi" }}
limits:
cpu: {{ .Values.resources.limits.cpu | default "500m" }}
memory: {{ .Values.resources.limits.memory | default "512Mi" }}
livenessProbe:
httpGet:
path: {{ .Values.probes.liveness.path | default "/health" }}
port: {{ .Values.service.port }}
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: {{ .Values.probes.readiness.path | default "/ready" }}
port: {{ .Values.service.port }}
initialDelaySeconds: 5
periodSeconds: 10