Skip to content

feat(gateway): add a helm chart that deploys a kgateway gateway#1770

Open
piuswa wants to merge 7 commits into
adfinis:mainfrom
piuswa:feat/add-gateway
Open

feat(gateway): add a helm chart that deploys a kgateway gateway#1770
piuswa wants to merge 7 commits into
adfinis:mainfrom
piuswa:feat/add-gateway

Conversation

@piuswa

@piuswa piuswa commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces a new chart that deploys a kgateway gateway.
Optional Features:

  • HorizontalPodAutoscaler
  • PodDisruptionBudget
  • NetworkPolicy
  • PodMonitor
  • ListenerPolicy for access logging and ProxyProtocol configuration
  • HTTP traffic can be redirected to HTTPS.

Issues

In internal tracker

Checklist

  • This PR contains a description of the changes I'm making
  • I updated the version in Chart.yaml
  • I updated the changelog with an artifacthub.io/changes annotation in Chart.yaml, check the example in the documentation.
  • I updated applicable README.md files using pre-commit run
  • I documented any high-level concepts I'm introducing in docs/
  • CI is currently green and this is ready for review
  • I am ready to test changes after they are applied and released

@piuswa
piuswa requested a review from cfi2017 April 2, 2026 08:40
Comment thread charts/gateway/values.yaml Outdated
@@ -0,0 +1,24 @@
{{- if .Values.otelcol.enabled }}

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.

shouldn't this be in the upstream otel chart?

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.

This can not be in the upstream chart, because ListenerPolicy is a kgateway specific object and therefore has to be defined with the gateway.

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.

did we consider stashing it in extraManifests for now?

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.

Removed and integrated into the primary listenerpolicy for the gateway.

Since the otelcol dependency was removed here (the listenerpolicy config is specifically an opentelemetry compatible grpc endpoint), I think this can be resolved.

@@ -0,0 +1,77 @@
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor

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.

Would it be possible to use a ServiceMonitor?

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.

The service created with the gateway by the controller does not expose the metrics port.

We'll create a separate metrics service here and point the servicemonitor to it.

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.

sire, this is a PodMonitor, how can we point to a ServiceMonitor if this creates a PodMonitor?

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.

Pod Monitor has been removed and changed to a Service Monitor

spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment

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.

Who manages this Deployment? Shouldn't it deploy Deployment related resources like HPAs?

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.

The Deployment is managed by the Gateway resource. As of version 2.2.2 of kgateway it is not possible to configure this using GatewayParameters. This will be possible in version 2.3.0 which is still in beta. Same goes for the PodDisruptionBudget.

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.

When to we expect 2.3.0 to be GA? If it's soon then we might as well skip adding them here.

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.

They seem to be halfway there currently with no due date set. Not really sure when to expect it.

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.

if they follow a quarterly release cycle, then i would assume that they release 2.3 in early may. my hope would also be that the release aligns with whatever plans upstream gateway-api sig has.

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.

As gateway api does not have a deterministic release cycle, it's a bit hard to anticipate:
https://gateway-api.sigs.k8s.io/contributing/release-cycle/

For instance, gateway api v1.5 was released on February 27th. A beta release of kgateway supporting this version of gateway api was cut on March 20th (v2.3.0-beta.3).

What changes with 2.3.0 as well is the creation of HPA and PDB resources using the gateway parameters.
Right now, we do this along with the chart. I think that's okay, since it's a minor change afterwards and shouldn't be user-facing.

At the current pace I do expect the 2.3 release to be sometime in May as well.

Keep in mind updating gateway-api can also depend on other components, such as support by cert-manager and external-dns, as well as support by installed helm charts deploying routes on API version changes.

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.

Given how soon we expect 2.3.0 to be released, would early adopting it's beta help us keep this change smaller? How would that fit with out roadmaps?

@piuswa
piuswa force-pushed the feat/add-gateway branch from 97fba7e to beffd1e Compare April 15, 2026 12:39
@piuswa
piuswa force-pushed the feat/add-gateway branch from beffd1e to 54b7f64 Compare April 15, 2026 12:47
@piuswa
piuswa marked this pull request as ready for review April 15, 2026 14:07
@piuswa
piuswa requested a review from a team as a code owner April 15, 2026 14:07
cfi2017
cfi2017 previously approved these changes Apr 16, 2026

@cfi2017 cfi2017 left a comment

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.

Once @hairmare 's comments are resolved this looks good to me.

@hairmare

Copy link
Copy Markdown
Contributor

Once @hairmare 's comments are resolved this looks good to me.

I might have more, the feedback i have so far was only from a quick initial scan of the change.

This also feels like it would benefit very much from some links (to issues that ask for the features from here in upstream) and a real explanation as to why it's needed.

dominrivera
dominrivera previously approved these changes Apr 20, 2026

@dominrivera dominrivera left a comment

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.

LGTM.
Just @cfi2017 do you think we can define something in here to fulfill this request? https://git.adfinis.com/ch-cloudnative/team-coordination/-/work_items/744#note_889098

@dominrivera
dominrivera dismissed their stale review April 20, 2026 09:25

Waiting for answer: #1770 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants