-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
333 lines (329 loc) · 8.53 KB
/
main.yml
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# Derived from ./contour-config
apiVersion: v1
kind: Namespace
metadata:
name: heptio-contour
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: contour
namespace: heptio-contour
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ingressroutes.contour.heptio.com
labels:
component: ingressroute
spec:
group: contour.heptio.com
version: v1beta1
scope: Namespaced
names:
plural: ingressroutes
kind: IngressRoute
additionalPrinterColumns:
- name: FQDN
type: string
description: Fully qualified domain name
JSONPath: .spec.virtualhost.fqdn
- name: TLS Secret
type: string
description: Secret with TLS credentials
JSONPath: .spec.virtualhost.tls.secretName
- name: First route
type: string
description: First routes defined
JSONPath: .spec.routes[0].match
- name: Status
type: string
description: The current status of the IngressRoute
JSONPath: .status.currentStatus
- name: Status Description
type: string
description: Description of the current status
JSONPath: .status.description
validation:
openAPIV3Schema:
properties:
spec:
properties:
virtualhost:
properties:
fqdn:
type: string
pattern: ^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-z0-9]{2,}$
tls:
properties:
secretName:
type: string
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
minimumProtocolVersion:
type: string
enum:
- "1.3"
- "1.2"
- "1.1"
strategy:
type: string
enum:
- RoundRobin
- WeightedLeastRequest
- Random
- RingHash
- Maglev
healthCheck:
type: object
required:
- path
properties:
path:
type: string
pattern: ^\/.*$
intervalSeconds:
type: integer
timeoutSeconds:
type: integer
unhealthyThresholdCount:
type: integer
healthyThresholdCount:
type: integer
routes:
type: array
items:
required:
- match
properties:
match:
type: string
pattern: ^\/.*$
delegate:
type: object
required:
- name
properties:
name:
type: string
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
namespace:
type: string
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ # DNS-1123 label
services:
type: array
items:
type: object
required:
- name
- port
properties:
name:
type: string
pattern: ^[a-z]([-a-z0-9]*[a-z0-9])?$ # DNS-1035 label
port:
type: integer
weight:
type: integer
strategy:
type: string
enum:
- RoundRobin
- WeightedLeastRequest
- Random
- RingHash
- Maglev
healthCheck:
type: object
required:
- path
properties:
path:
type: string
pattern: ^\/.*$
intervalSeconds:
type: integer
timeoutSeconds:
type: integer
unhealthyThresholdCount:
type: integer
healthyThresholdCount:
type: integer
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: tlscertificatedelegations.contour.heptio.com
labels:
component: tlscertificatedelegation
spec:
group: contour.heptio.com
version: v1beta1
scope: Namespaced
names:
plural: tlscertificatedelegations
kind: TLSCertificateDelegation
---
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
app: contour
name: contour
namespace: heptio-contour
spec:
selector:
matchLabels:
app: contour
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: contour
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8002"
prometheus.io/path: "/stats"
prometheus.io/format: "prometheus"
spec:
containers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
name: contour
command: ["contour"]
args: ["serve", "--incluster"]
- image: docker.io/envoyproxy/envoy-alpine:v1.9.0
name: envoy
ports:
- containerPort: 8080
name: http
- containerPort: 8443
name: https
command: ["envoy"]
args:
- --config-path /config/contour.json
- --service-cluster cluster0
- --service-node node0
- --log-level info
- --v2-config-only
readinessProbe:
httpGet:
path: /healthz
port: 8002
initialDelaySeconds: 3
periodSeconds: 3
volumeMounts:
- name: contour-config
mountPath: /config
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "http://localhost:9001/healthcheck/fail"]
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
name: envoy-initconfig
command: ["contour"]
args: ["bootstrap", "/config/contour.json"]
volumeMounts:
- name: contour-config
mountPath: /config
volumes:
- name: contour-config
emptyDir: {}
dnsPolicy: ClusterFirst
serviceAccountName: contour
terminationGracePeriodSeconds: 30
---
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: contour
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: contour
subjects:
- kind: ServiceAccount
name: contour
namespace: heptio-contour
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: contour
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- nodes
- pods
- secrets
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- apiGroups: ["contour.heptio.com"]
resources: ["ingressroutes", "tlscertificatedelegations"]
verbs:
- get
- list
- watch
- put
- post
- patch
---
---
apiVersion: v1
kind: Service
metadata:
name: contour
namespace: heptio-contour
annotations:
# This annotation puts the AWS ELB into "TCP" mode so that it does not
# do HTTP negotiation for HTTPS connections at the ELB edge.
# The downside of this is the remote IP address of all connections will
# appear to be the internal address of the ELB. See docs/proxy-proto.md
# for information about enabling the PROXY protocol on the ELB to recover
# the original remote IP address.
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
spec:
ports:
- port: 80
name: http
protocol: TCP
targetPort: 8080
- port: 443
name: https
protocol: TCP
targetPort: 8443
selector:
app: contour
type: LoadBalancer
---
---