Skip to content

Conversation

@chandler-solo
Copy link
Contributor

@chandler-solo chandler-solo commented Dec 2, 2025

Description

This is an implementation of a continuation of the API in #13007. It is intended to be followed up with:

You can see more precisely, and in context, how an end user would use this in test/deployer/testdata/agentgateway-params-primary.yaml or test/deployer/testdata/agentgateway-strategic-merge-patch-out.yaml

See https://github.com/howardjohn/kgateway/compare/api/agwp...chandler-solo:kgateway:chandler/api/agwp?expand=1 to understand what has changed vs. #13007

Relevant text from the description of #13007, highlighting the desire to make it possible to avoid AgentgatewayParameters' RawConfig, lightly edited because this API differs a little, follows:

The idea of the API is to primarily rely on 'overlays'. An overlay allows users to specify a metadata/spec for objects, which is an opaque map of fields that is strategic-merge-patch applied over the generated objects. This exposes every field of the underlying APIs, without requiring us to expose each API individually with a slightly different API; users can just use the Kubernetes APIs as they intended.

In order to facilitate very common configuration, or configuration that benefits from being broken out. Currently, this includes memory and CPU resources, image, etc. We should avoid creeping this too much. Likely the following are potentially in scope (copied from AGW underlying config):

|config||
|config.enableIpv6||
|config.localXdsPath|Local XDS path. If not specified, the current configuration file will be used.|
|config.caAddress||
|config.caAuthToken||
|config.xdsAddress||
|config.xdsAuthToken||
|config.namespace||
|config.gateway||
|config.trustDomain||
|config.serviceAccount||
|config.clusterId||
|config.network||
|config.adminAddr|Admin UI address in the format "ip:port"|
|config.statsAddr|Stats/metrics server address in the format "ip:port"|
|config.readinessAddr|Readiness probe server address in the format "ip:port"|
|config.connectionTerminationDeadline||
|config.connectionMinTerminationDeadline||
|config.workerThreads||
|config.metrics||
|config.metrics.remove||
|config.metrics.fields||
|config.metrics.fields.add||
|config.hbone||
|config.hbone.windowSize||
|config.hbone.connectionWindowSize||
|config.hbone.frameSize||
|config.hbone.poolMaxStreamsPerConn||
|config.hbone.poolUnusedReleaseTimeout|

Change Type

/kind feature

Changelog

Added a new AgentgatewayParameters API in `agentgateway.dev/v1alpha1`

Additional Notes

@gateway-bot gateway-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note labels Dec 2, 2025
@chandler-solo
Copy link
Contributor Author

The test/deployer diffs would be greatly simplified if we first landed a PR that only changed the *-out.yaml files' map key ordering to alphabetical instead of 'as helm renders it'.

Copy link
Contributor

@josh-pritchard josh-pritchard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a full review yet but have some feedback. Overall I really like the direction and I think we are simplifying some things by not having a package in internal & pkg. I am looking forward to you bringing the existing generator code in-line with this when this merges

chandler-solo added a commit to chandler-solo/kgateway that referenced this pull request Dec 3, 2025
Before, they were helm's output. Soon we'll introduce a strategic-merge-patch
step after that, so let's make the kgateway-dev#13018 code review easier by switching to
golden files that are marshalled YAML of the objects we'll deploy (the identity
function (for now) on helm's output but with alphabetical map keys since helm
isn't producing the golden files).

Signed-off-by: David L. Chandler <[email protected]>
@chandler-solo
Copy link
Contributor Author

The test/deployer diffs would be greatly simplified if we first landed a PR that only changed the *-out.yaml files' map key ordering to alphabetical instead of 'as helm renders it'.

I've broken out a prequel PR #13037; this review will shrink once that lands and this is updated.

@chandler-solo
Copy link
Contributor Author

I duplicated the 'Image' API now that GVKs have split.

Copy link
Contributor

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks really good

@josh-pritchard josh-pritchard self-assigned this Dec 4, 2025
@chandler-solo chandler-solo added the work in progress Indicates that a PR should not merge because it is a work in progress label Dec 4, 2025
@chandler-solo chandler-solo marked this pull request as ready for review December 4, 2025 06:16
@chandler-solo chandler-solo changed the title api + implementation: AgentgatewayParameters [WIP] api + implementation: AgentgatewayParameters Dec 4, 2025
@chandler-solo
Copy link
Contributor Author

Not done with review comments. I'll leave PDBs and HPAs to a follow up since those are new features and I'd like to discuss them further.

chandler-solo added a commit to chandler-solo/kgateway that referenced this pull request Dec 4, 2025
@chandler-solo chandler-solo removed the work in progress Indicates that a PR should not merge because it is a work in progress label Dec 4, 2025
@chandler-solo chandler-solo changed the title [WIP] api + implementation: AgentgatewayParameters api + implementation: AgentgatewayParameters Dec 4, 2025
@chandler-solo
Copy link
Contributor Author

#13037 has landed and this has been updated. No *-out.yaml golden files were changed (except brand new ones).

Copy link
Contributor

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with followups

Add PDB and HPA
Remove GatewayParams support
Split HelmConfig for AGW and KGW
Merge GC and Gateway level params

@chandler-solo
Copy link
Contributor Author

@howardjohn, your commits on #13007 were squashed with mine into a single commit because it's the safest, fastest way I could think of to solve the problem of forgetting to sign off on a commit in the middle of the stack, which I did by using 'git revert' instead of 'git revert --signoff'.

Signed-off-by: David L. Chandler <[email protected]>
Signed-off-by: David L. Chandler <[email protected]>
- DRY up TLS & other tests
- add validator support to make it less likely an engineer and their code
  reviewers miss something. why comment when you can assert?
- VerifyAllYAMLFilesReferenced

Signed-off-by: David L. Chandler <[email protected]>
This is especially helpful because it is now obvious when a change to your
config will propagate to your actual serving data plane pods.

Signed-off-by: David L. Chandler <[email protected]>
@chandler-solo
Copy link
Contributor Author

I went ahead and proposed an API addition rawConfig so that the ~200 config options there. It is now obvious when a change to your config will propagate to your actual serving data-plane pods.

Signed-off-by: David L. Chandler <[email protected]>
Signed-off-by: David L. Chandler <[email protected]>
Signed-off-by: David L. Chandler <[email protected]>
Signed-off-by: David L. Chandler <[email protected]>
@chandler-solo
Copy link
Contributor Author

/retest

namespace: default
spec:
shutdown:
minSeconds: 15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be a followup: would prefer to do min: 15s vs minSeconds. This would be more consistent with other agentgateway resources

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I had to fix json vs. Json, I changed this too.

config.yaml: |
config:
logging:
format: Json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe agentgateway requires this to be json not Json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it locally and you are correct. Changed it.

I missed `#[serde(rename_all = "camelCase")]` in the agentgateway code.

Signed-off-by: David L. Chandler <[email protected]>
Signed-off-by: David L. Chandler <[email protected]>
@chandler-solo
Copy link
Contributor Author

/merge

@gateway-bot gateway-bot enabled auto-merge December 8, 2025 20:04
Signed-off-by: David L. Chandler <[email protected]>
auto-merge was automatically disabled December 8, 2025 20:28

Head branch was pushed to by a user without write access

@chandler-solo
Copy link
Contributor Author

/merge

@gateway-bot gateway-bot enabled auto-merge December 8, 2025 20:28
@gateway-bot gateway-bot added this pull request to the merge queue Dec 8, 2025
Merged via the queue into kgateway-dev:main with commit 026f39c Dec 8, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants