Add Gateway API (HTTPRoute) support to Console Helm chart and CRD#1329
Open
Add Gateway API (HTTPRoute) support to Console Helm chart and CRD#1329
Conversation
- Add GatewayConfig and GatewayParentReference types to console_types.go - Add Gateway field to ConsoleValues and RedpandaConsole structs - Add RBAC permission for gateway.networking.k8s.io/httproutes - Register gatewayv1 types in V2 scheme - Bump sigs.k8s.io/gateway-api from v1.4.1 to v1.5.1 - Regenerate deepcopy and goverter conversion code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add validation in NewRenderState to reject both gateway and ingress enabled - Update notes.go to use else-if for gateway vs ingress - Remove ingress-and-gateway-templating test case (no longer valid) - Add TestIngressGatewayMutualExclusion test - Add TestGatewayRemoval tests (config removal, explicit disable, switch) - Add changelog entries for console chart and operator Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 tasks
Chart-level tests (TestGatewayConfigFields): - hostnames: set and change hostnames - path/pathType: set custom path, change path, default PathPrefix - annotations: set, change, verify old keys removed - parentRefs: all fields, name-only, multiple refs, change refs - backend service port derived from service config CRD-level tests (TestController): - gateway-enabled: Console CRD with gateway config renders HTTPRoute - gateway-custom-path: multiple hostnames, custom path, multiple parentRefs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Run `go work sync` to propagate gateway-api v1.5.1 to all modules - Regenerate console chart golden txtar with correct gateway-templating output - Fix lint alignment in render_test.go (Enabled field spacing) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Regenerate CRDs, deepcopy, RBAC, and schema for gateway API support - Fix InUseServerCerts to not skip external listener certs when internal TLS is disabled (the original bug fix for values.go) - Add Gateway API CRD loading in console controller tests so envtest can handle HTTPRoute resources - Update lifecycle and controller golden test files - Run go mod tidy across all modules - Regenerate crd-docs.adoc Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflict: accept deletion of operator/multicluster/values.go (removed in main by commit 16dcf9d). The InUseServerCerts bug fix now only lives in charts/redpanda/values.go. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… CRDs missing - Regenerate operator/chart/testdata/template-cases.golden.txtar to include the new gateway.networking.k8s.io httproutes RBAC rules added to console.ClusterRole.yaml. - Skip watching HTTPRoute resources when Gateway API CRDs are not installed in the cluster, following the same pattern used for ServiceMonitor. This prevents the operator from crashing at startup in environments without Gateway API (e.g. kuttl test clusters). - Generalize skipServiceMonitorWatchIfNotInstalled into a reusable skipWatchIfNotInstalled method. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move common-go/kube/kubetest to the third-party import group where gci expects it (not the redpanda-operator prefix group). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The gotohelm-generated template was stale after the InUseServerCerts refactor in values.go. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The InUseServerCerts refactor in values.go now correctly includes external listener certs when internal TLS is disabled. This updates the golden test output to reflect the additional cert mounts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update licenses/third_party.md for gomega v1.39.1 and gateway-api v1.5.1 - Regenerate lifecycle golden files with CI env vars (TEST_REDPANDA_REPO and TEST_REDPANDA_VERSION) so they match CI-rendered output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore common-go/kube/kubetest to the redpanda-operator import group as requested by RafalKorepta. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
w1ndhunter
reviewed
Mar 23, 2026
Remove mutual exclusion validation so both Ingress and HTTPRoute can be enabled simultaneously, enabling gradual traffic migration from Ingress to Gateway API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
RafalKorepta
approved these changes
Mar 30, 2026
|
This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
|
This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for Kubernetes Gateway API
HTTPRouteresources to the Console chart and operator, allowing users to expose Console via Gateway API controllers (e.g. Envoy Gateway, Istio, Cilium) as an alternative to classic Ingress.Closes #1308
Supersedes #1309 (recreated from upstream branch for CI)
Original chart work by @w1ndhunter.
Prerequisites
Gateway API CRDs must be installed in your cluster before enabling this feature. The CRDs are not bundled with the Redpanda Helm chart or operator — they are maintained by the Kubernetes Gateway API project.
Install Gateway API CRDs
Install a Gateway controller
You also need a Gateway API-compatible controller running in your cluster. Common options include:
Create a
Gatewayresource that theHTTPRoutewill attach to:Changes
Console Helm Chart
gatewayvalues block alongside existingingressblockgateway.gowithHTTPRoute()rendering functionHTTPRouteadded toRender()manifest list andTypes()scheme registrationgatewayv1.Install(Scheme)for Gateway API type serializationnotes.goto show Gateway URLs (mutually exclusive with Ingress)NewRenderStaterejects both gateway and ingress enabled simultaneouslyOperator (Console CRD)
GatewayConfigandGatewayParentReferencetypes inconsole_types.goGatewayfield added toConsoleValuesandRedpandaConsolestructsgateway.networking.k8s.io/httproutespermissionsgatewayv1types in V2 schemesigs.k8s.io/gateway-apifrom v1.4.1 → v1.5.1Console Controller Tests — Gateway API CRD Loading⚠️
Bug Fix: InUseServerCerts external TLS cert mounting
InUseServerCertsincharts/redpanda/values.go(andoperator/multicluster/values.go) where acontinuestatement on the internal listener's TLS check would skip registering external sub-listener certs. External certs are now checked independently of internal TLS state.Usage Examples
Helm Chart — Gateway API
Helm Chart — Classic Ingress (unchanged)
Console CRD (Operator) — Gateway API
Console CRD (Operator) — Switching from Gateway to Ingress
To switch, remove the
gatewaystanza and addingress:The operator will remove the HTTPRoute and create an Ingress instead.
Test plan
go build ./...passes inoperator/andcharts/console/go test ./...passes incharts/console/— includes:TestIngressGatewayMutualExclusion— both enabled → errorTestGatewayRemoval/gateway_removed_from_config— no gateway stanza → no HTTPRouteTestGatewayRemoval/gateway_explicitly_disabled—enabled: false→ no HTTPRouteTestGatewayRemoval/switch_from_gateway_to_ingress— gateway→ingress produces Ingress, no HTTPRouteTestTemplategolden tests (gateway-templating case)TestController/gateway-enabled— basic gateway with parentRefsTestController/gateway-custom-path— custom path and multiple parentRefsgatewayfield with correct OpenAPI validationgateway.enabled: true→ HTTPRoute createdgateway.enabled: true→ HTTPRoute created🤖 Generated with Claude Code