-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
70 lines (70 loc) · 2 KB
/
deployment.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "webproxy.fullname" . }}
namespace: {{ .Values.namespace }}
labels:
app: {{ template "webproxy.name" . }}
chart: {{ template "webproxy.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "webproxy.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "webproxy.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: squid
containerPort: 3128
protocol: TCP
livenessProbe:
tcpSocket:
port: squid
readinessProbe:
tcpSocket:
port: squid
volumeMounts:
- mountPath: /etc/squid3/
name: squid3
resources:
{{ toYaml .Values.resources | indent 12 }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ template "webproxy.name" . }}
topologyKey: failure-domain.beta.kubernetes.io/zone
weight: 100
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: squid3
configMap:
name: {{ template "webproxy.fullname" . }}
items:
- key: conf
path: squid.conf
- key: htpasswd
path: passwords