Skip to content

Commit 695f16e

Browse files
Create more example yaml files (#164)
* Update httproute and backendref so that it wont confict with previous name * Update BYOC TLS example * Add header based routing example yaml * Add example for gateway that not associated to VPC
1 parent 5348c6e commit 695f16e

File tree

6 files changed

+119
-12
lines changed

6 files changed

+119
-12
lines changed
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
apiVersion: gateway.networking.k8s.io/v1beta1
22
kind: HTTPRoute
33
metadata:
4-
name: review
4+
name: byoc-parking
55
spec:
66
hostnames:
7-
- review.my-test.com
7+
- parking.my-test.com
88
parentRefs:
99
- name: my-hotel
1010
sectionName: http
1111
rules:
1212
- backendRefs:
13-
- name: review2
13+
- name: parking-ver2
1414
kind: Service
1515
port: 8090
16-
matches:
17-
- path:
18-
type: PathPrefix
19-
value: /review2

examples/my-other-gateway.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: gateway.networking.k8s.io/v1beta1
2+
kind: Gateway
3+
metadata:
4+
name: my-other-hotel
5+
annotations:
6+
application-networking.k8s.aws/lattice-vpc-association: "false"
7+
spec:
8+
gatewayClassName: amazon-vpc-lattice
9+
listeners:
10+
- name: http
11+
protocol: HTTP
12+
port: 80

examples/rate-canary.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: rate-canary
5+
labels:
6+
app: rate-canary
7+
spec:
8+
replicas: 2
9+
selector:
10+
matchLabels:
11+
app: rate-canary
12+
template:
13+
metadata:
14+
labels:
15+
app: rate-canary
16+
spec:
17+
containers:
18+
- name: aug24-rate-canary
19+
image: public.ecr.aws/x2j8p8w7/http-server:latest
20+
env:
21+
- name: PodName
22+
value: "rate-canary handler pod"
23+
24+
25+
---
26+
apiVersion: v1
27+
kind: Service
28+
metadata:
29+
name: rate-canary
30+
spec:
31+
selector:
32+
app: rate-canary
33+
ports:
34+
- protocol: TCP
35+
port: 80
36+
targetPort: 8090

examples/rate-preprod.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: rate-preprod
5+
labels:
6+
app: rate-preprod
7+
spec:
8+
replicas: 2
9+
selector:
10+
matchLabels:
11+
app: rate-preprod
12+
template:
13+
metadata:
14+
labels:
15+
app: rate-preprod
16+
spec:
17+
containers:
18+
- name: aug24-rate-preprod
19+
image: public.ecr.aws/x2j8p8w7/http-server:latest
20+
env:
21+
- name: PodName
22+
value: "rate-preprod handler pod"
23+
24+
25+
---
26+
apiVersion: v1
27+
kind: Service
28+
metadata:
29+
name: rate-preprod
30+
spec:
31+
selector:
32+
app: rate-preprod
33+
ports:
34+
- protocol: TCP
35+
port: 80
36+
targetPort: 8090

examples/rate-route-header.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: gateway.networking.k8s.io/v1beta1
2+
kind: HTTPRoute
3+
metadata:
4+
name: rates-header
5+
spec:
6+
parentRefs:
7+
- name: my-hotel
8+
sectionName: http
9+
rules:
10+
- backendRefs:
11+
- name: rate-canary
12+
kind: Service
13+
port: 8090
14+
matches:
15+
- headers:
16+
- type: Exact
17+
name: env
18+
value: canary
19+
- backendRefs:
20+
- name: rate-preprod
21+
kind: Service
22+
port: 8090
23+
matches:
24+
- headers:
25+
- type: Exact
26+
name: env
27+
value: preprod
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
apiVersion: gateway.networking.k8s.io/v1beta1
22
kind: HTTPRoute
33
metadata:
4-
name: review
4+
name: tls-parking
55
spec:
66
hostnames:
7-
- review.my-test.com
7+
- tls-parking.my-test.com
88
parentRefs:
99
- name: my-hotel
1010
sectionName: tls-with-customer-cert
1111
rules:
1212
- backendRefs:
13-
- name: review1
13+
- name: parking-ver3
1414
kind: Service
1515
port: 8090
1616
matches:
1717
- path:
18-
type: PathPrefix
19-
value: /review1
18+
type: Exact
19+
value: /parking

0 commit comments

Comments
 (0)