Skip to content

Implement agentgateway emitter#388

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
markuskobler:agw-emitter
Mar 20, 2026
Merged

Implement agentgateway emitter#388
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
markuskobler:agw-emitter

Conversation

@markuskobler
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
This adds initial support for Agentgateway. Note that Agentgateway has undergone significant changes recently as it gears up for a 1.0.0 release. Critical to this feature is the migration of the controller out of kgateway and into github.com/agentgateway/agentgateway.

Which issue(s) this PR fixes:
Fixes #364

Does this PR introduce a user-facing change?:

Initial support for Agentgateway resources

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 9, 2026
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 9, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @markuskobler. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 9, 2026
@Stevenjin8
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 9, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 9, 2026
@markuskobler
Copy link
Copy Markdown
Contributor Author

@Stevenjin8 apologies I missed I checked in the go.sum. Can you re-run the tests?

@markuskobler
Copy link
Copy Markdown
Contributor Author

markuskobler commented Mar 9, 2026

/retest

@markuskobler
Copy link
Copy Markdown
Contributor Author

/test pull-ingress2gateway-test

@markuskobler
Copy link
Copy Markdown
Contributor Author

I'm not clear on the cause of the verify error. Running make verify locally returns

hack/verify-all.sh -v
Skipping hack/../hack/verify-all.sh
Verified 0 file headers match boilerplate
SUCCESS: hack/../hack/verify-boilerplate.sh
0 issues.
SUCCESS: hack/../hack/verify-golint.sh

Comment thread pkg/i2gw/emitters/agentgateway/agentgateway.go Outdated
@markuskobler markuskobler force-pushed the agw-emitter branch 2 times, most recently from c7fd27c to ee1e61f Compare March 9, 2026 18:41
@markuskobler markuskobler requested a review from bexxmodd March 10, 2026 01:28
@Stevenjin8
Copy link
Copy Markdown
Contributor

/retest

@Stevenjin8
Copy link
Copy Markdown
Contributor

@markuskobler also, I'm planning on mergeing #366 (its really annoying to rebase) before this PR, so you might want to get a head start on the rebase.

@markuskobler
Copy link
Copy Markdown
Contributor Author

@markuskobler also, I'm planning on mergeing #366 (its really annoying to rebase) before this PR, so you might want to get a head start on the rebase.

Thanks for the heads up will try to look at this later today

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2026
@Stevenjin8
Copy link
Copy Markdown
Contributor

@markuskobler We are looking to do a 1.0 release next week btw

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2026
@markuskobler
Copy link
Copy Markdown
Contributor Author

@markuskobler We are looking to do a 1.0 release next week btw

@Stevenjin8 sounds good. We are also looking a agw 1.0 release by the end of this week now that the controller is fully split from kgateway.

@Stevenjin8
Copy link
Copy Markdown
Contributor

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markuskobler, Stevenjin8

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 14, 2026
agentgatewayCRDsRelease = "agentgateway-crds"
)

func DeployAgentgateway(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need this helper for any tests? If so - I'm not seeing any new test cases in this PR. If not, I wonder if we should add a helper we aren't using.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question. Given that the agentgateway controller was split out from kgateway I initially just duplicated the kgateway e2e test.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be an opportunity to implement the first emitter test - see category 4 in https://github.com/kubernetes-sigs/ingress2gateway/blob/main/e2e/README.md.

WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 on adding a quick test. Just a sanity check that it works to help me sleep at night

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry I thought I had correctly wired up the tests. It should be used now

{name: implementation.KongName},
{name: implementation.KgatewayName},
{name: implementation.EnvoyGatewayName},
{name: implementation.AgentgatewayName},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This adds a smoke test for agentgateway as an implementation. This does not test any emitter features. Given that this PR is titled "Implement agentgateway emitter" I just wanted to make sure this is what you intended.

Copy link
Copy Markdown
Contributor Author

@markuskobler markuskobler Mar 16, 2026

Choose a reason for hiding this comment

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

We are planning to add more functionality now that agentgateway has released v1.0 and is no longer part of kgateway, which is what a previous PR was attempting to add agentgateway emitter support against.

The main reason I avoided adding anything beyond logging a warning for unsupported functionality was the number of changes the current go.mod would pull in. I hope to get the controller go.mod split from the api later this week or next.

I can make this a much bigger change if you wanted however?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't have the full context here and have no strong opinions. Just wanted to ensure you're aware what the test you've added does and doesn't do 🙂 I'll leave it up to you.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FWIW I think it's a good idea to have agentgateway in the implementation smoke tests.

@Stevenjin8
Copy link
Copy Markdown
Contributor

I will merge this by lazy consensus before the 1.0 release if there are no more comments.

Comment thread CODEOWNERS
* @LiorLieberman @rikatz @robscott @Stevenjin8 @youngnick
/pkg/i2gw/emitters/envoygateway/ @kkk777-7 No newline at end of file
/pkg/i2gw/emitters/envoygateway/ @kkk777-7
/pkg/i2gw/emitters/agentgateway/ @howardjohn @npolshakova @markuskobler @danehans @puertomontt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curious: Why two separate lines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My editor adds a newline at end of file. Happy to minimize the diff if you'd prefer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tell me you use vim without telling me you use vim. I like the new line

@markuskobler
Copy link
Copy Markdown
Contributor Author

I will merge this by lazy consensus before the 1.0 release if there are no more comments.

I'm hoping to get a PR in adding support for AgentGateway regex path rewrites, which should make the emitter slightly less trivial. I've just been swamped with work this last week.

@Stevenjin8
Copy link
Copy Markdown
Contributor

@markuskobler if ou look at the path rewrite code, I've set it so it's pretty easy for you to add regex rewrites without changing provider code

@markuskobler
Copy link
Copy Markdown
Contributor Author

@markuskobler if ou look at the path rewrite code, I've set it so it's pretty easy for you to add regex rewrites without changing provider code

@Stevenjin8 I'm assuming your talking about the emitterir.PathRewrite?

My plan was to convert the regex paths to agentgateway specific CEL equivalents. But happy to take feedback if you think there is a better way of implementing this?

@Stevenjin8
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 20, 2026
@k8s-ci-robot k8s-ci-robot merged commit 21601cd into kubernetes-sigs:main Mar 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add agentgateway as an emitter

6 participants