Skip to content

Commit

Permalink
make testdata
Browse files Browse the repository at this point in the history
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg committed Nov 1, 2023
1 parent 374569e commit 02a5402
Show file tree
Hide file tree
Showing 51 changed files with 67 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
8 changes: 4 additions & 4 deletions internal/gatewayapi/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour
accepted := false
for _, listener := range parentRef.listeners {
// only one route is allowed for a UDP listener
if listener.AttachedRoutes() > 0 {
if listener.AttachedRoutes() > 1 {
continue
}
if !listener.IsReady() {
Expand Down Expand Up @@ -911,7 +911,7 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour
accepted := false
for _, listener := range parentRef.listeners {
// only one route is allowed for a TCP listener
if listener.AttachedRoutes() > 0 {
if listener.AttachedRoutes() > 1 {
continue
}
if !listener.IsReady() {
Expand Down Expand Up @@ -1081,8 +1081,6 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont
continue
}

parentRefCtx.SetListeners(allowedListeners...)

// Its safe to increment AttachedRoutes since we've found a valid parentRef
// and the listener allows this Route kind

Expand All @@ -1103,6 +1101,8 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont
continue
}

parentRefCtx.SetListeners(allowedListeners...)

parentRefCtx.SetCondition(routeContext,
gwapiv1.RouteConditionAccepted,
metav1.ConditionTrue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gateways:
protocol: HTTP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gateways:
protocol: HTTP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gateways:
protocol: HTTP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ tlsRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gateways:
mode: Terminate
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Secret envoy-gateway/tls-secret-ecdsa-2 public key algorithm must
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gateways:
mode: Passthrough
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: TLS Passthrough mode is not supported, TLS mode must be Terminate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gateways:
mode: Terminate
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Listener must have at least 1 TLS certificate ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gateways:
mode: Terminate
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Secret envoy-gateway/tls-secret-1 must contain valid tls.crt and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gateways:
mode: Terminate
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Secret envoy-gateway/tls-secret-1 does not exist.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gateways:
mode: Terminate
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Certificate ref to secret default/tls-secret-1 not permitted by any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gateways:
mode: Terminate
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Secret envoy-gateway/tls-secret-1 must contain tls.crt and tls.key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: TCP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: TCP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: TCP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: UDP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: UDP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: UDP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ httpRoutes:
parents:
- conditions:
- lastTransitionTime: null
message: There are no ready listeners for this parent ref
reason: NoReadyListeners
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: TCP
status:
listeners:
- attachedRoutes: 1
- attachedRoutes: 2
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gateways:
protocol: UDP
status:
listeners:
- attachedRoutes: 1
- attachedRoutes: 2
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: TCPRoute
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Only one TCP/TLS listener is allowed in a given port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: UDPRoute
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Only one UDP listener is allowed in a given port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gateways:
mode: Passthrough
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: All listeners for a given port must use a unique hostname
Expand All @@ -49,7 +49,7 @@ gateways:
kind: HTTPRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: All listeners for a given port must use a unique hostname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gateways:
protocol: HTTP
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: All listeners for a given port must use a unique hostname
Expand All @@ -47,7 +47,7 @@ gateways:
kind: HTTPRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: All listeners for a given port must use a unique hostname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gateways:
protocol: HTTPS
status:
listeners:
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: All listeners for a given port must use a compatible protocol
Expand All @@ -47,7 +47,7 @@ gateways:
kind: HTTPRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
- attachedRoutes: 0
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: All listeners for a given port must use a compatible protocol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gateways:
protocol: TCP
status:
listeners:
- attachedRoutes: 1
- attachedRoutes: 2
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand All @@ -43,7 +43,7 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: TCPRoute
- attachedRoutes: 1
- attachedRoutes: 2
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gateways:
protocol: UDP
status:
listeners:
- attachedRoutes: 1
- attachedRoutes: 2
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand All @@ -43,7 +43,7 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: UDPRoute
- attachedRoutes: 1
- attachedRoutes: 2
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
Expand Down
Loading

0 comments on commit 02a5402

Please sign in to comment.