Skip to content

feat(helm): Gateway API support; deprecate Ingress - #154

Merged
wind-c merged 3 commits into
wind-c:mainfrom
debsahu:feat/helm-gateway-api
May 9, 2026
Merged

feat(helm): Gateway API support; deprecate Ingress#154
wind-c merged 3 commits into
wind-c:mainfrom
debsahu:feat/helm-gateway-api

Conversation

@debsahu

@debsahu debsahu commented May 6, 2026

Copy link
Copy Markdown
Contributor

Adds Gateway API resources to the chart and marks the Ingress block as deprecated, per @sansmoraxz's review feedback on #150 about ingress-nginx retirement.

What's in

New resources

File apiVersion Purpose
templates/httproute.yaml gateway.networking.k8s.io/v1 Routes the dashboard to a user-supplied Gateway.
templates/tcproute.yaml gateway.networking.k8s.io/v1alpha2 Routes raw MQTT TCP. Requires a TCP-aware Gateway provider (Envoy Gateway, Cilium, etc.).

New gateway: values block

gateway:
  enabled: false
  parentRefs:                  # default for both routes
    - name: my-gateway
      namespace: gateway-system
  dashboard:
    enabled: true
    parentRefs: []             # override gateway.parentRefs
    hostnames: []
    matches:
      - path: { type: PathPrefix, value: / }
  mqtt:
    enabled: false
    parentRefs: []

Per-route parentRefs falls back to gateway.parentRefs when empty, so the common case is one parentRefs: entry on the chart-level block.

Ingress deprecation

  • values.yaml comment marks the block DEPRECATED with the upstream retirement reference.
  • values.schema.json flags the property deprecated: true.
  • NOTES.txt prints a migration warning when ingress.enabled=true.
  • README replaces the "Exposing MQTT externally" section with a Gateway-API-first guide; legacy Ingress is kept as a documented fallback.

The existing templates/ingress.yaml is retained for back-compat so existing users aren't broken on upgrade. Removal can land in a future major chart bump.

Verification (helm template ci .)

Path Result
gateway.enabled=true, both routes + ingress.enabled=true HTTPRoute (gateway.networking.k8s.io/v1) + TCPRoute (gateway.networking.k8s.io/v1alpha2) + Ingress all rendered; deprecation warning fires in NOTES
gateway.dashboard.enabled=false, gateway.mqtt.enabled=true TCPRoute only
Default values No gateway resources rendered (master toggle off)

helm lint . clean.

Out of scope

  • Removing the legacy templates/ingress.yaml. Defer to a future major bump (e.g. chart 1.0.0) when enough time has passed for users to migrate.
  • A Gateway resource. Convention is for the chart to ship Routes; users supply the Gateway via parentRefs. Bundling a Gateway would couple the chart to one provider.
  • TLS configuration on the Routes themselves. For TLS at the Gateway, configure the Gateway listener; for TLS at the broker, the existing tls.* values still apply.

Refs

debsahu added 2 commits May 6, 2026 12:10
Adds Gateway API resources to the chart and marks the Ingress block as
deprecated, per @sansmoraxz's review feedback on wind-c#150 about
ingress-nginx retirement
(https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/).

New resources:

- `templates/httproute.yaml` (gateway.networking.k8s.io/v1) — routes
  the dashboard to a user-supplied Gateway via parentRefs.
- `templates/tcproute.yaml` (gateway.networking.k8s.io/v1alpha2) —
  routes raw MQTT TCP. Requires a TCP-aware Gateway implementation
  (Envoy Gateway, Cilium, etc.).

New `gateway:` values block with a master toggle, default parentRefs,
and per-route overrides. Each route inherits the chart-level parentRefs
when its own list is empty.

Ingress deprecation:
- values.yaml comment marks the block DEPRECATED with the upstream
  retirement reference.
- values.schema.json marks the property `deprecated: true`.
- NOTES.txt prints a migration warning when ingress.enabled=true.
- README replaces the "Exposing MQTT externally" section with a
  Gateway-API-first guide; legacy Ingress kept as a fallback.

The existing Ingress template is retained for back-compat. New
deployments should set `gateway.enabled=true`.

Render paths verified via helm template:
- gateway.enabled=true with both routes + ingress.enabled=true
  (deprecation warning + both routes rendered)
- gateway.dashboard.enabled=false, gateway.mqtt.enabled=true
  (TCPRoute only)
- default values (no gateway resources rendered)
The HTTPRoute now targets the broker's HTTP listener (REST API + /metrics
on port 8080) rather than a dashboard, since wind-c#151 closed and the dashboard
moved to a separate add-on module. Renames:

- values.yaml: gateway.dashboard -> gateway.api
- HTTPRoute resource name: <release>-dashboard -> <release>-api
- README, NOTES.txt, schema, sub-path limitation updated to match
- Chart.yaml changelog reframed (REST API + metrics, not dashboard)

The HTTPRoute itself is still useful for users who want to expose the REST
API or /metrics through Gateway API, just no longer dashboard-specific.
@debsahu

debsahu commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

Pushed f0603db to update for the dashboard-as-add-on outcome (see #151 close).

Changes from the previous push:

  • gateway.dashboard.* renamed to gateway.api.* since upstream's port 8080 serves the REST API and /metrics, not a dashboard. The HTTPRoute is still useful for exposing those, just no longer dashboard-specific.
  • HTTPRoute resource name: <release>-dashboard is now <release>-api.
  • README and NOTES.txt updated to describe the route as "REST API + /metrics" rather than "dashboard".
  • Existing service.dashboard.{type,port,nodePort} value name kept for back-compat with chart 0.1.0; it refers to the HTTP listener port regardless of what is mounted on it. Renaming that key would be a breaking change beyond this PR's scope.

Render verified for the renamed values (gateway.api.enabled and gateway.api.hostnames), TCPRoute path, and the disabled-api / TCPRoute-only path.

@debsahu
debsahu marked this pull request as ready for review May 8, 2026 16:21
@wind-c
wind-c merged commit 82c49f5 into wind-c:main May 9, 2026
3 checks passed
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.

2 participants