Skip to content

feat: Add HTTPRoute support for Gateway API#67

Open
hoangphuocbk wants to merge 1 commit into
kafbat:mainfrom
hoangphuocbk:http-route
Open

feat: Add HTTPRoute support for Gateway API#67
hoangphuocbk wants to merge 1 commit into
kafbat:mainfrom
hoangphuocbk:http-route

Conversation

@hoangphuocbk
Copy link
Copy Markdown

@hoangphuocbk hoangphuocbk commented Jun 5, 2026

Summary by CodeRabbit

  • New Features

    • Added optional Kubernetes Gateway API HTTPRoute support for traffic exposure, offering an alternative to Ingress.
  • Documentation

    • Added HTTPRoute configuration docs (annotations, labels, parentRefs, hostnames, pathType/path, scheme, rules).
    • Installation notes updated to show HTTPRoute URLs when enabled.
  • Chores

    • Chart version bumped to 1.6.5.

@hoangphuocbk hoangphuocbk requested a review from a team as a code owner June 5, 2026 11:21
@kapybro kapybro Bot added status/needs-triage area/serde Serialization & Deserialization (plugins) scope/backend Related to backend changes type/feature A brand new feature and removed status/needs-triage labels Jun 5, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

Warning

Review limit reached

@hoangphuocbk, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 27 minutes and 19 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 63fdef20-f5fb-4cb2-82e1-a7a411473543

📥 Commits

Reviewing files that changed from the base of the PR and between aef4368 and 940872d.

📒 Files selected for processing (5)
  • charts/kafka-ui/CONFIGURATION.md
  • charts/kafka-ui/Chart.yaml
  • charts/kafka-ui/templates/NOTES.txt
  • charts/kafka-ui/templates/httproute.yaml
  • charts/kafka-ui/values.yaml
📝 Walkthrough

Walkthrough

This PR adds Kubernetes Gateway API HTTPRoute support to the Kafka-UI Helm chart. A new HTTPRoute resource template is introduced alongside configuration values, deployment notes are updated to display URLs, and the chart version is incremented to 1.6.5.

Changes

Gateway API HTTPRoute Support for Kafka-UI

Layer / File(s) Summary
HTTPRoute Configuration Schema and Documentation
charts/kafka-ui/values.yaml, charts/kafka-ui/CONFIGURATION.md
HTTPRoute values block defines enablement, annotations, labels, required parentRefs, optional hostnames, default path matching (pathType/path), and custom rules. Configuration table documents all HTTPRoute parameters alongside existing Ingress options.
HTTPRoute Helm Template
charts/kafka-ui/templates/httproute.yaml
New Gateway API HTTPRoute template renders conditionally when enabled, validates parentRefs presence, applies metadata and hostnames, and builds routing rules from custom rules or a default single-path backend to the Kafka-UI service.
User-Facing Deployment Output
charts/kafka-ui/templates/NOTES.txt
Added conditional branch to display application URLs when HTTPRoute is enabled, iterating over configured hostnames and appending the route path to each.
Chart Version Metadata
charts/kafka-ui/Chart.yaml
Chart version incremented from 1.6.4 to 1.6.5.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • kafbat/helm-charts#65: Previous version bump to 1.6.4 in Chart.yaml; this PR builds on that baseline to add Gateway API HTTPRoute feature support.

Poem

A rabbit hops where routes align,
Templated leaves and values fine,
ParentRefs checked, hostnames told,
Paths and schemes in YAML gold,
🎋🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: Add HTTPRoute support for Gateway API' directly and clearly describes the main change: adding HTTPRoute support (a Gateway API feature) to the kafka-ui Helm chart.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
charts/kafka-ui/templates/NOTES.txt (1)

8-11: ⚡ Quick win

Consider making the URL scheme configurable for HTTPRoute.

The URL output always uses http://, but HTTPRoute may be served over HTTPS when the Gateway has TLS configured. Unlike Ingress (line 5), where TLS configuration is part of the Ingress spec, HTTPRoute TLS is configured on the Gateway itself, making it impossible to auto-detect here.

Consider adding a configurable field like httproute.scheme (defaulting to http) to allow users to specify the correct scheme for their setup.

💡 Suggested enhancement

Add to values.yaml:

httproute:
  ## `@param` httproute.scheme URL scheme (http or https) to display in NOTES.txt
  scheme: http

Then update NOTES.txt line 10:

-  http://{{ tpl $host $ }}{{ $.Values.httproute.path }}
+  {{ $.Values.httproute.scheme }}://{{ tpl $host $ }}{{ $.Values.httproute.path }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/kafka-ui/templates/NOTES.txt` around lines 8 - 11, The NOTES.txt
currently hardcodes "http://" for HTTPRoute URLs; add a configurable values key
(httproute.scheme) defaulting to "http" and change the template to use that
value instead of the literal string so users can set "https" when their Gateway
uses TLS; update values.yaml to document httproute.scheme and modify the
template block that renders URLs (the range over .Values.httproute.hostnames in
NOTES.txt) to prefix URLs with the resolved scheme (e.g., use default("http",
$.Values.httproute.scheme) or equivalent Helm templating) so the output reflects
the configured scheme.
charts/kafka-ui/CONFIGURATION.md (1)

94-94: ⚡ Quick win

Complete the documentation for httproute.rules.

The description should mention that backendRefs in custom rules are ignored and the Kafka-UI service is always used, as documented in values.yaml line 297. This is important user-facing behavior.

📝 Suggested documentation improvement
-| `httproute.rules`          | Advanced routing rules. If empty, a default rule matching httproute.path is generated                                            | `[]`        |
+| `httproute.rules`          | Advanced routing rules. If empty, a default rule matching httproute.path is generated. Any backendRefs in custom rules are ignored and the Kafka-UI service is always used | `[]`        |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/kafka-ui/CONFIGURATION.md` at line 94, Update the documentation line
for httproute.rules to explicitly state that custom HTTPRoute rules may be
provided but any backendRefs within those custom rules are ignored and the Chart
will always route to the Kafka-UI service; reference the values.yaml setting
that enforces this behavior by mentioning the values key (httproute.rules) and
the chart's enforced backend selection so users know Kafka-UI is always used
regardless of backendRefs in custom rules.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@charts/kafka-ui/CONFIGURATION.md`:
- Line 94: Update the documentation line for httproute.rules to explicitly state
that custom HTTPRoute rules may be provided but any backendRefs within those
custom rules are ignored and the Chart will always route to the Kafka-UI
service; reference the values.yaml setting that enforces this behavior by
mentioning the values key (httproute.rules) and the chart's enforced backend
selection so users know Kafka-UI is always used regardless of backendRefs in
custom rules.

In `@charts/kafka-ui/templates/NOTES.txt`:
- Around line 8-11: The NOTES.txt currently hardcodes "http://" for HTTPRoute
URLs; add a configurable values key (httproute.scheme) defaulting to "http" and
change the template to use that value instead of the literal string so users can
set "https" when their Gateway uses TLS; update values.yaml to document
httproute.scheme and modify the template block that renders URLs (the range over
.Values.httproute.hostnames in NOTES.txt) to prefix URLs with the resolved
scheme (e.g., use default("http", $.Values.httproute.scheme) or equivalent Helm
templating) so the output reflects the configured scheme.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 33ca3b3b-e035-475a-a773-48bd54e1550f

📥 Commits

Reviewing files that changed from the base of the PR and between 8f38cec and edb092e.

📒 Files selected for processing (5)
  • charts/kafka-ui/CONFIGURATION.md
  • charts/kafka-ui/Chart.yaml
  • charts/kafka-ui/templates/NOTES.txt
  • charts/kafka-ui/templates/httproute.yaml
  • charts/kafka-ui/values.yaml

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/kafka-ui/templates/NOTES.txt`:
- Line 10: NOTES.txt uses tpl to render hostnames but httproute.yaml writes
spec.hostnames with toYaml, causing inconsistent hostname templating; make them
consistent by changing httproute.yaml so spec.hostnames are rendered with tpl
(the same templating behavior NOTES.txt uses) instead of raw toYaml output
(i.e., apply tpl to the hostname values before emitting spec.hostnames) so that
tpl, spec.hostnames, NOTES.txt and httproute.yaml are aligned.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e849f508-f9a2-44ba-8a75-5adf12ddc088

📥 Commits

Reviewing files that changed from the base of the PR and between edb092e and aef4368.

📒 Files selected for processing (3)
  • charts/kafka-ui/CONFIGURATION.md
  • charts/kafka-ui/templates/NOTES.txt
  • charts/kafka-ui/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • charts/kafka-ui/CONFIGURATION.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/kafka-ui/values.yaml

Comment thread charts/kafka-ui/templates/NOTES.txt Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/serde Serialization & Deserialization (plugins) scope/backend Related to backend changes type/feature A brand new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant