Skip to content

Commit ba7ba13

Browse files
committed
Merge branch 'main' of github.com:kgateway-dev/kgateway into lbip
Signed-off-by: omar <[email protected]>
2 parents fd60631 + af11f9b commit ba7ba13

File tree

209 files changed

+20139
-1999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+20139
-1999
lines changed

.custom-gcl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v2.6.2
1+
version: v2.7.1
22
name: golangci-lint-custom
33
destination: _output
44
plugins:

.github/workflows/e2e.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ jobs:
4444
# August 29, 2025: ~9 minutes
4545
- cluster-name: 'cluster-three'
4646
go-test-args: '-timeout=25m'
47-
go-test-run-regex: '^TestKgateway$$/^DynamicForwardProxy$$|^TestKgateway$$/^Lambda$$|^TestKgateway$$/^AccessLog$$|^TestKgateway$$/^LocalRateLimit$$|^TestKgateway$$/^Cors$$|^TestKgateway$$/^BackendConfigPolicy$$|^TestKgateway$$/^HttpListenerPolicy$$|^TestKgateway$$/^Tracing$$|^TestKgateway$$/^DirectResponse$$|^TestKgateway$$/^AdminServer$$'
47+
go-test-run-regex: '^TestKgateway$$/^DynamicForwardProxy$$|^TestKgateway$$/^Lambda$$|^TestKgateway$$/^AccessLog$$|^TestKgateway$$/^LocalRateLimit$$|^TestKgateway$$/^Cors$$|^TestKgateway$$/^BackendConfigPolicy$$|^TestKgateway$$/^ListenerPolicy$$|^TestKgateway$$/^Tracing$$|^TestKgateway$$/^DirectResponse$$|^TestKgateway$$/^AdminServer$$'
4848
localstack: 'true'
4949
# August 29, 2025: ~9 minutes
5050
- cluster-name: 'cluster-four'
5151
go-test-args: '-timeout=25m'
52-
go-test-run-regex: '^TestKgateway$$/^ExtProc$$|^TestKgateway$$/^ExtAuth$$|^TestKgateway$$/^PolicySelector$$|^TestKgateway$$/^Backends$$|^TestKgateway$$/^BackendTLSPolicies$$|^TestKgateway$$/^CSRF$$|^TestKgateway$$/^AutoHostRewrite$$|^TestKgateway$$/^LeaderElection$$|^TestKgateway$$/^ListenerPolicyProxyProtocol$$|^TestKgateway$$/^Compression$$|^TestParallelControllers$$'
52+
go-test-run-regex: '^TestKgateway$$/^ExtProc$$|^TestKgateway$$/^ExtAuth$$|^TestKgateway$$/^PolicySelector$$|^TestKgateway$$/^Backends$$|^TestKgateway$$/^BackendTLSPolicies$$|^TestKgateway$$/^CSRF$$|^TestKgateway$$/^AutoHostRewrite$$|^TestKgateway$$/^LeaderElection$$|^TestKgateway$$/^Compression$$|^TestParallelControllers$$'
5353
localstack: 'false'
5454
# August 29, 2025: ~10 minutes
5555
- cluster-name: 'cluster-five'
5656
go-test-args: '-timeout=25m'
57-
go-test-run-regex: '^TestKgateway$$/^TimeoutRetry$$|^TestKgateway$$/^HeaderModifiers$$|^TestKgateway$$/^RBAC$$|^TestKgateway$$/^Deployer$$|^TestKgateway$$/^Transforms$$|^TestRouteReplacement$$|^TestKgateway$$/^RouteDelegation$$|^TestKgateway$$/^JWT$$|^TestKgateway$$/^BasicAuth$$'
57+
go-test-run-regex: '^TestKgateway$$/^TimeoutRetry$$|^TestKgateway$$/^HeaderModifiers$$|^TestKgateway$$/^RBAC$$|^TestKgateway$$/^APIKeyAuth$$|^TestKgateway$$/^Deployer$$|^TestKgateway$$/^Transforms$$|^TestRouteReplacement$$|^TestKgateway$$/^RouteDelegation$$|^TestKgateway$$/^JWT$$|^TestKgateway$$/^BasicAuth$$'
5858
localstack: 'false'
5959
# August 29, 2025: ~9 minutes
6060
- cluster-name: 'cluster-six'

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ test-with-coverage: GINKGO_FLAGS += $(GINKGO_COVERAGE_FLAGS)
192192
test-with-coverage: test
193193
go tool cover -html $(OUTPUT_DIR)/coverage.cov
194194

195+
.PHONY: golden-deployer
196+
golden-deployer: ## Refreshes golden files for ./test/deployer snapshot testing
197+
REFRESH_GOLDEN=true go test ./test/deployer/... > /dev/null || true
198+
@echo ""
199+
@echo "This must pass after refreshing:"
200+
go test ./test/deployer/...
201+
195202
#----------------------------------------------------------------------------------
196203
# Env test
197204
#----------------------------------------------------------------------------------

api/settings/settings.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ type Settings struct {
238238
// EnableExperimentalGatewayAPIFeatures enables kgateway to support experimental features and APIs
239239
EnableExperimentalGatewayAPIFeatures bool `split_words:"true" default:"true"`
240240

241+
// GwpAgwpCompatibility controls whether agentgateway data plane Gateways can use
242+
// GatewayParameters. When set to false, only AgentgatewayParameters are allowed,
243+
// and using GatewayParameters will result in an error. Defaults to true for
244+
// backward compatibility.
245+
GwpAgwpCompatibility bool `split_words:"true" default:"true"`
246+
241247
// GatewayClassParametersRefs configures the GatewayParameters references to set on the default GatewayClasses.
242248
// Format: JSON map where keys are GatewayClass names and values are objects with "name" (required),
243249
// "namespace" (required), "group" (optional), and "kind" (optional) fields.

api/settings/settings_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func allEnvVarsSet() map[string]string {
5151
"KGW_XDS_AUTH": "false",
5252
"KGW_XDS_TLS": "true",
5353
"KGW_ENABLE_EXPERIMENTAL_GATEWAY_API_FEATURES": "false",
54+
"KGW_GWP_AGWP_COMPATIBILITY": "false",
5455
}
5556
}
5657

@@ -104,6 +105,7 @@ func TestSettings(t *testing.T) {
104105
XdsAuth: true,
105106
XdsTLS: false,
106107
EnableExperimentalGatewayAPIFeatures: true,
108+
GwpAgwpCompatibility: true,
107109
GatewayClassParametersRefs: GatewayClassParametersRefs{},
108110
},
109111
},
@@ -143,6 +145,7 @@ func TestSettings(t *testing.T) {
143145
XdsAuth: false,
144146
XdsTLS: true,
145147
EnableExperimentalGatewayAPIFeatures: false,
148+
GwpAgwpCompatibility: false,
146149
GatewayClassParametersRefs: GatewayClassParametersRefs{
147150
"kgateway": {
148151
Name: "custom-gwp",
@@ -234,6 +237,7 @@ func TestSettings(t *testing.T) {
234237
XdsAuth: true,
235238
XdsTLS: false,
236239
EnableExperimentalGatewayAPIFeatures: true,
240+
GwpAgwpCompatibility: true,
237241
GatewayClassParametersRefs: GatewayClassParametersRefs{},
238242
},
239243
},
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
_err: "min' value must be less than or equal to the 'max"
2+
apiVersion: agentgateway.dev/v1alpha1
3+
kind: AgentgatewayParameters
4+
metadata:
5+
name: shutdown-min-gt-max
6+
spec:
7+
shutdown:
8+
min: 61
9+
max: 60
10+
---
11+
# min and max are required, which avoids the more confusing error
12+
# "AgentgatewayParameters/shutdown-min-gt-max/: spec.shutdown: Invalid value:
13+
# \"object\": no such key: min evaluating rule: The 'min' value
14+
# must be less than or equal to the 'max' value."
15+
_err: "AgentgatewayParameters/shutdown-min-gt-max/: spec.shutdown.min: Required value"
16+
apiVersion: agentgateway.dev/v1alpha1
17+
kind: AgentgatewayParameters
18+
metadata:
19+
name: shutdown-min-gt-max
20+
spec:
21+
shutdown:
22+
max: 60
23+
---
24+
_err: "AgentgatewayParameters/shutdown-min-gt-max/: spec.shutdown.max: Required value"
25+
apiVersion: agentgateway.dev/v1alpha1
26+
kind: AgentgatewayParameters
27+
metadata:
28+
name: shutdown-min-gt-max
29+
spec:
30+
shutdown:
31+
min: 0
32+
---
33+
_err: "Unsupported value"
34+
apiVersion: agentgateway.dev/v1alpha1
35+
kind: AgentgatewayParameters
36+
metadata:
37+
name: logging-format-invalid
38+
spec:
39+
logging:
40+
format: Unknown
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: agentgateway.dev/v1alpha1
2+
kind: AgentgatewayParameters
3+
metadata:
4+
name: shutdown-min-gt-max
5+
spec:
6+
shutdown:
7+
max: 0
8+
min: 0

0 commit comments

Comments
 (0)