Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
373cc8b
rename listener using its address and port
zhaohuabing Jul 17, 2025
b5ebedf
rename udp listener using its address and port
zhaohuabing Jul 17, 2025
0cd2b1e
fix e2e
zhaohuabing Jul 18, 2025
67ca839
add metadata to listener
zhaohuabing Jul 18, 2025
4f03942
fix e2e
zhaohuabing Jul 18, 2025
d893f92
fix test
zhaohuabing Jul 18, 2025
729ddd1
fix test
zhaohuabing Jul 18, 2025
7febe3c
fix test
zhaohuabing Jul 18, 2025
70004c4
add feature flag for listener name
zhaohuabing Jul 21, 2025
20f9cb4
remove metadata for tcp and udp listeners
zhaohuabing Jul 21, 2025
497cedc
fix int
zhaohuabing Jul 21, 2025
5996876
release notes
zhaohuabing Jul 21, 2025
117a25f
update api
zhaohuabing Jul 22, 2025
786dae7
add validation
zhaohuabing Jul 23, 2025
4965c41
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 23, 2025
372c87c
add protocol prefix to listener name
zhaohuabing Jul 23, 2025
3db9b6a
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 23, 2025
b255a41
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 24, 2025
dbc25f5
rename listener using protocol and port
zhaohuabing Jul 25, 2025
22433e5
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 25, 2025
5863891
rename tests
zhaohuabing Jul 25, 2025
97577a6
add host suffix to filterChain name
zhaohuabing Jul 25, 2025
86145d3
fix test
zhaohuabing Jul 25, 2025
5ca080c
fix e2e
zhaohuabing Jul 25, 2025
fe945d4
modify listener stat prefix
zhaohuabing Jul 26, 2025
c01ee3d
rename routeconfig
zhaohuabing Jul 26, 2025
172fff2
fix e2e
zhaohuabing Jul 26, 2025
ea805e6
fix gen
zhaohuabing Jul 26, 2025
0e48149
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 26, 2025
2cdc332
fix gen
zhaohuabing Jul 26, 2025
6040211
fix e2e
zhaohuabing Jul 26, 2025
dcef7d1
minor change
zhaohuabing Jul 26, 2025
4cdaff6
remove duplicated virtual hosts in RouteConfig
zhaohuabing Jul 27, 2025
11249c8
minor change
zhaohuabing Jul 28, 2025
14d865c
split route config on different hosts for HTTPS listeners
zhaohuabing Jul 29, 2025
e593461
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 29, 2025
e7fc940
remove listener metadata
zhaohuabing Jul 29, 2025
8de0377
remove listener metadata
zhaohuabing Jul 29, 2025
7312157
remove external port
zhaohuabing Jul 29, 2025
4c7e56e
remove listener metadata
zhaohuabing Jul 29, 2025
74ba442
remove unnecessary change
zhaohuabing Jul 29, 2025
49cb214
remove unnecessary change
zhaohuabing Jul 29, 2025
4073bfa
update test file
zhaohuabing Jul 29, 2025
efc13f7
set listener and filter chain names, rollback other names
zhaohuabing Jul 30, 2025
c96448e
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 30, 2025
68f941f
fix gen
zhaohuabing Jul 30, 2025
3d15136
Merge remote-tracking branch 'origin/main' into fix-6534
zhaohuabing Jul 30, 2025
287e50e
minor change
zhaohuabing Jul 30, 2025
7928d48
remove unnecessary change
zhaohuabing Jul 30, 2025
d95f35d
update the default filter chain name
zhaohuabing Jul 30, 2025
a9406bb
address comment
zhaohuabing Jul 30, 2025
523588c
fix gen
zhaohuabing Jul 30, 2025
e08d884
Merge branch 'main' into fix-6534
zirain Jul 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ jobs:
- version: v1.33.1
ipFamily: dual # only run dual test on latest version to save time
profile: gateway-namespace-mode
- version: v1.33.1
ipFamily: ipv4
profile: xds-name-scheme-v2
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./tools/github-actions/setup-deps
Expand Down Expand Up @@ -149,6 +152,10 @@ jobs:
- version: v1.33.1
ipFamily: dual # only run dual test on latest version to save time
profile: gateway-namespace-mode
- version: v1.33.1
ipFamily: ipv4
profile: xds-name-scheme-v2

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./tools/github-actions/setup-deps
Expand Down
26 changes: 26 additions & 0 deletions api/v1alpha1/envoygateway_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,32 @@ func (e *EnvoyGateway) GatewayNamespaceMode() bool {
*e.Provider.Kubernetes.Deploy.Type == KubernetesDeployModeTypeGatewayNamespace
}

// defaultRuntimeFlags are the default runtime flags for Envoy Gateway.
var defaultRuntimeFlags = map[RuntimeFlag]bool{
XDSNameSchemeV2: false,
}

// IsEnabled checks if a runtime flag is enabled in the EnvoyGateway configuration.
func (f *RuntimeFlags) IsEnabled(flag RuntimeFlag) bool {
if f != nil {
for _, disable := range f.Disabled {
if disable == flag {
return false
}
}
for _, enable := range f.Enabled {
if enable == flag {
return true
}
}
}

if defaultValue, found := defaultRuntimeFlags[flag]; found {
return defaultValue
}
return false
}

// DefaultLeaderElection returns a new LeaderElection with default configuration parameters.
func DefaultLeaderElection() *LeaderElection {
return &LeaderElection{
Expand Down
7 changes: 5 additions & 2 deletions api/v1alpha1/envoygateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@ type EnvoyGatewaySpec struct {

// RuntimeFlag defines a runtime flag used to guard breaking changes or risky experimental features in new Envoy Gateway releases.
// A runtime flag may be enabled or disabled by default and can be toggled through the EnvoyGateway resource.
// +enum
// +kubebuilder:validation:Enum=XDSNameSchemeV2
type RuntimeFlag string

const (
// UseAddressAsListenerName indicates that the listener name should be derived from the address and port.
UseAddressAsListenerName RuntimeFlag = "UseAddressAsListenerName"
// XDSNameSchemeV2 indicates that the xds name scheme v2 is used.
// * The listener name will be generated using the protocol and port of the listener.
XDSNameSchemeV2 RuntimeFlag = "XDSNameSchemeV2"
)

// RuntimeFlags provide a mechanism to guard breaking changes or risky experimental features in new Envoy Gateway releases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ xdsIR:
- path: /dev/stdout
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
27 changes: 15 additions & 12 deletions internal/gatewayapi/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
case gwapiv1.HTTPProtocolType, gwapiv1.HTTPSProtocolType:
irListener := &ir.HTTPListener{
CoreListenerDetails: ir.CoreListenerDetails{
Name: irListenerName(listener),
Address: address,
Port: uint32(containerPort),
Metadata: buildListenerMetadata(listener, gateway),
IPFamily: ipFamily,
Name: irListenerName(listener),
Address: address,
Port: uint32(containerPort),
ExternalPort: uint32(listener.Port),
Metadata: buildListenerMetadata(listener, gateway),
IPFamily: ipFamily,
},
TLS: irTLSConfigs(listener.tlsSecrets...),
Path: ir.PathSettings{
Expand All @@ -146,10 +147,11 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
case gwapiv1.TCPProtocolType, gwapiv1.TLSProtocolType:
irListener := &ir.TCPListener{
CoreListenerDetails: ir.CoreListenerDetails{
Name: irListenerName(listener),
Address: address,
Port: uint32(containerPort),
IPFamily: ipFamily,
Name: irListenerName(listener),
Address: address,
Port: uint32(containerPort),
ExternalPort: uint32(listener.Port),
IPFamily: ipFamily,
},

// Gateway is processed firstly, then ClientTrafficPolicy, then xRoute.
Expand All @@ -162,9 +164,10 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
case gwapiv1.UDPProtocolType:
irListener := &ir.UDPListener{
CoreListenerDetails: ir.CoreListenerDetails{
Name: irListenerName(listener),
Address: address,
Port: uint32(containerPort),
Name: irListenerName(listener),
Address: address,
Port: uint32(containerPort),
ExternalPort: uint32(listener.Port),
},
}
xdsIR[irKey].UDP = append(xdsIR[irKey].UDP, irListener)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
1 change: 1 addition & 0 deletions internal/gatewayapi/testdata/accesslog-als-grpc.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
1 change: 1 addition & 0 deletions internal/gatewayapi/testdata/accesslog.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down Expand Up @@ -363,6 +364,7 @@ xdsIR:
- path: /dev/stdout
http:
- address: 0.0.0.0
externalPort: 81
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ xdsIR:
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
Expand Down
Loading
Loading