/
03-envoy.yaml
106 lines (106 loc) · 2.58 KB
/
03-envoy.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: envoy
name: envoy
namespace: heptio-contour
spec:
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 10%
selector:
matchLabels:
app: envoy
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8002"
prometheus.io/path: "/stats/prometheus"
labels:
app: envoy
spec:
containers:
- args:
- -c
- /config/contour.json
- --service-cluster
- cluster0
- --service-node
- node0
command:
- envoy
image: docker.io/envoyproxy/envoy:v1.10.0
imagePullPolicy: IfNotPresent
name: envoy
ports:
- containerPort: 80
hostPort: 80
name: http
protocol: TCP
- containerPort: 443
hostPort: 443
name: https
protocol: TCP
readinessProbe:
httpGet:
path: /healthz
port: 8002
initialDelaySeconds: 3
periodSeconds: 3
volumeMounts:
- name: contour-config
mountPath: /config
- name: envoycert
mountPath: /certs
- name: cacert
mountPath: /ca
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
initContainers:
- args:
- bootstrap
- /config/contour.json
- --xds-address
- contour
- --xds-port
- "8001"
- --envoy-cafile=/ca/cacert.pem
- --envoy-cert-file=/certs/tls.crt
- --envoy-key-file=/certs/tls.key
command:
- contour
image: gcr.io/heptio-images/contour:v0.14.1
imagePullPolicy: Always
name: envoy-initconfig
volumeMounts:
- name: contour-config
mountPath: /config
- name: envoycert
mountPath: /certs
readOnly: true
- name: cacert
mountPath: /ca
readOnly: true
env:
- name: CONTOUR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
automountServiceAccountToken: false
volumes:
- name: contour-config
emptyDir: {}
- name: envoycert
secret:
secretName: envoycert
- name: cacert
secret:
secretName: cacert
restartPolicy: Always