Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d40f5d3
fix: Allow weights to be zero on endpoints
tobrien-nydig Feb 14, 2025
55e0c06
chore: bump go to 1.24 (#5287)
zirain Feb 18, 2025
e855fea
build(deps): bump sigs.k8s.io/kind from 0.26.0 to 0.27.0 in /tools/sr…
dependabot[bot] Feb 18, 2025
1eb360b
build(deps): bump helm.sh/helm/v3 from 3.17.0 to 3.17.1 (#5291)
dependabot[bot] Feb 18, 2025
13a88ad
build(deps): bump the golang-org group across 2 directories with 1 up…
dependabot[bot] Feb 18, 2025
c27c8f1
build(deps): bump github.com/golangci/golangci-lint from 1.63.4 to 1.…
dependabot[bot] Feb 18, 2025
d5b97b6
Add test case
tobrien-nydig Feb 18, 2025
f97e035
Add test case
tobrien-nydig Feb 18, 2025
ee7464d
one more test
tobrien-nydig Feb 18, 2025
682d7d4
one more test
tobrien-nydig Feb 18, 2025
53d33ef
remove
tobrien-nydig Feb 18, 2025
4a6406a
Found the bug for real
tobrien-nydig Feb 18, 2025
e3a2b2d
Focus on gatewayapi
tobrien-nydig Feb 19, 2025
17362d6
cleanup
tobrien-nydig Feb 19, 2025
8c639a8
cleanup
tobrien-nydig Feb 19, 2025
3933d78
build(deps): bump github.com/evanphx/json-patch/v5 from 5.9.0 to 5.9.…
dependabot[bot] Feb 18, 2025
83ec08e
api: BackendTrafficPolicy DNSLookupFamily (#5249)
guydc Feb 19, 2025
3c37e69
clean up logic on if
tobrien-nydig Feb 19, 2025
e0f1dca
Update logic and add udp tests
tobrien-nydig Feb 19, 2025
4d3612f
fix udp tests
tobrien-nydig Feb 19, 2025
d668694
chore: ignore `sched.co` (#5305)
zirain Feb 19, 2025
10602e9
newline
tobrien-nydig Feb 19, 2025
25986ef
Merge branch 'main' into zero-weight-fix
tobrien-nydig Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions internal/gatewayapi/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,11 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour
)
continue
}
destSettings = append(destSettings, ds)

// Skip nil destination settings
if ds != nil {
destSettings = append(destSettings, ds)
}
}

// If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True"
Expand Down Expand Up @@ -1176,7 +1180,10 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour
)
continue
}
destSettings = append(destSettings, ds)
// Skip nil destination settings
if ds != nil {
destSettings = append(destSettings, ds)
}
}

// If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
namespace: envoy-gateway
name: gateway-1
spec:
gatewayClassName: envoy-gateway-class
listeners:
- name: tcp
protocol: TCP
port: 90
allowedRoutes:
namespaces:
from: All
tcpRoutes:
- apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
namespace: default
name: tcproute-1
spec:
parentRefs:
- namespace: envoy-gateway
name: gateway-1
rules:
- backendRefs:
- name: service-1
port: 8080
weight: 1
- name: service-2
port: 8080
weight: 2
- name: service-3
port: 8080
weight: 3
- name: service-4
port: 8080
weight: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
creationTimestamp: null
name: gateway-1
namespace: envoy-gateway
spec:
gatewayClassName: envoy-gateway-class
listeners:
- allowedRoutes:
namespaces:
from: All
name: tcp
port: 90
protocol: TCP
status:
listeners:
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: null
message: Listener has been successfully translated
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: null
message: Listener references have been resolved
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
name: tcp
supportedKinds:
- group: gateway.networking.k8s.io
kind: TCPRoute
infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: null
name: envoy-gateway/gateway-1/tcp
ports:
- containerPort: 10090
name: tcp-90
protocol: TCP
servicePort: 90
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
name: envoy-gateway/gateway-1
tcpRoutes:
- apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
creationTimestamp: null
name: tcproute-1
namespace: default
spec:
parentRefs:
- name: gateway-1
namespace: envoy-gateway
rules:
- backendRefs:
- name: service-1
port: 8080
weight: 1
- name: service-2
port: 8080
weight: 2
- name: service-3
port: 8080
weight: 3
- name: service-4
port: 8080
weight: 0
status:
parents:
- conditions:
- lastTransitionTime: null
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: null
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parentRef:
name: gateway-1
namespace: envoy-gateway
xdsIR:
envoy-gateway/gateway-1:
accessLog:
text:
- path: /dev/stdout
readyListener:
address: 0.0.0.0
ipFamily: IPv4
path: /ready
port: 19003
tcp:
- address: 0.0.0.0
name: envoy-gateway/gateway-1/tcp
port: 10090
routes:
- destination:
name: tcproute/default/tcproute-1/rule/-1
settings:
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8080
protocol: TCP
weight: 1
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8080
protocol: TCP
weight: 2
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8080
protocol: TCP
weight: 3
name: tcproute/default/tcproute-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
namespace: envoy-gateway
name: gateway-1
spec:
gatewayClassName: envoy-gateway-class
listeners:
- name: udp
protocol: UDP
port: 90
allowedRoutes:
namespaces:
from: All
udpRoutes:
- apiVersion: gateway.networking.k8s.io/v1alpha2
kind: UDPRoute
metadata:
namespace: default
name: udproute-1
spec:
parentRefs:
- namespace: envoy-gateway
name: gateway-1
rules:
- backendRefs:
- name: service-1
port: 8162
weight: 1
- name: service-2
port: 8162
weight: 2
- name: service-3
port: 8162
weight: 3
- name: service-4
port: 8162
weight: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
creationTimestamp: null
name: gateway-1
namespace: envoy-gateway
spec:
gatewayClassName: envoy-gateway-class
listeners:
- allowedRoutes:
namespaces:
from: All
name: udp
port: 90
protocol: UDP
status:
listeners:
- attachedRoutes: 1
conditions:
- lastTransitionTime: null
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: null
message: Listener has been successfully translated
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: null
message: Listener references have been resolved
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
name: udp
supportedKinds:
- group: gateway.networking.k8s.io
kind: UDPRoute
infraIR:
envoy-gateway/gateway-1:
proxy:
listeners:
- address: null
name: envoy-gateway/gateway-1/udp
ports:
- containerPort: 10090
name: udp-90
protocol: UDP
servicePort: 90
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
name: envoy-gateway/gateway-1
udpRoutes:
- apiVersion: gateway.networking.k8s.io/v1alpha2
kind: UDPRoute
metadata:
creationTimestamp: null
name: udproute-1
namespace: default
spec:
parentRefs:
- name: gateway-1
namespace: envoy-gateway
rules:
- backendRefs:
- name: service-1
port: 8162
weight: 1
- name: service-2
port: 8162
weight: 2
- name: service-3
port: 8162
weight: 3
- name: service-4
port: 8162
weight: 0
status:
parents:
- conditions:
- lastTransitionTime: null
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: null
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parentRef:
name: gateway-1
namespace: envoy-gateway
xdsIR:
envoy-gateway/gateway-1:
accessLog:
text:
- path: /dev/stdout
readyListener:
address: 0.0.0.0
ipFamily: IPv4
path: /ready
port: 19003
udp:
- address: 0.0.0.0
name: envoy-gateway/gateway-1/udp
port: 10090
route:
destination:
name: udproute/default/udproute-1/rule/-1
settings:
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8162
protocol: UDP
weight: 1
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8162
protocol: UDP
weight: 2
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8162
protocol: UDP
weight: 3
name: udproute/default/udproute-1
Loading