/
cilium-gatewayapi-example.yaml
101 lines (101 loc) · 1.9 KB
/
cilium-gatewayapi-example.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
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: tls-gateway
annotations:
cert-manager.io/cluster-issuer: letsencrypt-route53
spec:
gatewayClassName: cilium
listeners:
- name: https-1
protocol: HTTPS
port: 443
hostname: "bookinfo-gw.viktoriouslab.nl"
tls:
certificateRefs:
- kind: secret
name: bookinfo-gw
namespace: bookinfo
- name: https-2
protocol: HTTPS
port: 443
hostname: "shop-gw.viktoriouslab.nl"
tls:
certificateRefs:
- kind: Secret
name: shop-gw
namespace: shop
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: https-app-route-1
namespace: bookinfo
spec:
parentRefs:
- name: tls-gateway
hostnames:
- "bookinfo-gw.viktoriouslab.nl"
rules:
- matches:
- path:
type: PathPrefix
value: /details
backendRefs:
- name: details
port: 9080
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: productpage
port: 9080
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: https-app-route-2
namespace: bookinfo
spec:
parentRefs:
- name: tls-gateway
hostnames:
- "shop-gw.viktoriouslab.nl"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: frontend
namespace: shop
port: 80
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
name: productpage
namespace: shop
spec:
from:
- group: gateway.networking.k8s.io
kind: HTTPRoute
namespace: bookinfo
to:
- group: ""
kind: Service
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
name: secret-shop-gw
namespace: shop
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: bookinfo
to:
- group: ""
kind: Secret