Skip to content

Commit d38a4b4

Browse files
committed
Fixes to make conformance tests happy
1 parent 5176c6d commit d38a4b4

File tree

6 files changed

+46
-56
lines changed

6 files changed

+46
-56
lines changed

examples/standard/clusterip-gateway/clusterip-gateway.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ metadata:
44
name: example-cluster-ip-gateway
55
spec:
66
addresses:
7-
- 10.12.0.15
7+
- value: 10.12.0.15
88
gatewayClassName: cluster-ip
99
listeners:
1010
- name: example-service
1111
protocol: TCP
1212
port: 8080
1313
allowedRoutes:
1414
kinds:
15-
- kind: TCPRoute/CustomRoute
15+
- kind: [TCPRoute|CustomRoute]

examples/standard/clusterip-gateway/clusterip-gatewayclass.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ kind: GatewayClass
33
metadata:
44
name: cluster-ip
55
spec:
6-
controllerName: "cluster-ip-controller"
6+
controllerName: "networking.k8s.io/cluster-ip-controller"

examples/standard/clusterip-gateway/customroute.yaml

-25
This file was deleted.

examples/standard/clusterip-gateway/endpointselector.yaml

-10
This file was deleted.

examples/standard/clusterip-gateway/tcproute-with-endpointselector.yaml

-15
This file was deleted.

geps/gep-3539/index.md

+43-3
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,32 @@ suggested as an example of a custom resource that implementations could have to
7979
potentially other resource kinds) directly to a Route via backendRef.
8080

8181
```yaml
82-
{% include 'standard/clusterip-gateway/tcproute-with-endpointselector.yaml' %}
82+
apiVersion: networking.gke.io/v1alpha1
83+
kind: EndpointSelector
84+
metadata:
85+
name: front-end-pods
86+
spec:
87+
kind: Pod
88+
selector:
89+
- key: app
90+
value: frontend
91+
operator: In
8392
```
8493
8594
The EndpointSelector object is defined as follows. It allows the user to specify which endpoints
8695
should be targeted for the Route.
8796
8897
```yaml
89-
{% include 'standard/clusterip-gateway/endpointselector.yaml' %}
98+
apiVersion: networking.gke.io/v1alpha1
99+
kind: EndpointSelector
100+
metadata:
101+
name: front-end-pods
102+
spec:
103+
kind: Pod
104+
selector:
105+
- key: app
106+
value: frontend
107+
operator: In
90108
```
91109
92110
To allow more granular control over traffic routing, there have been discussions around adding
@@ -117,7 +135,29 @@ specify an IP address range for Gateway IP allocation.
117135
Finally the specific Route and EndpointSelector resources must be created in order to set up the backend
118136
pods for the configured ClusterIP.
119137
```yaml
120-
{% include 'standard/clusterip-gateway/customroute.yaml' %}
138+
kind: [TCPRoute|CustomRoute]
139+
metadata:
140+
name: service-route
141+
spec:
142+
config:
143+
sessionAffinity: false
144+
parentRefs:
145+
- name: example-cluster-ip-gateway
146+
rules:
147+
backendRefs:
148+
- kind: EndpointSelector
149+
port: 8080
150+
name: exampleapp-app-pods
151+
---
152+
apiVersion: gateway.networking.k8s.io/v1alpha1
153+
kind: EndpointSelector
154+
metadata:
155+
name: exampleapp-app-pods
156+
spec:
157+
selector:
158+
- key: app
159+
value: exampleapp
160+
operator: In
121161
```
122162
123163
### Backends on Listeners

0 commit comments

Comments
 (0)