[AMORO-4242][Helm] Add Gateway API HTTPRoute support to the Amoro chart#4243
Conversation
Signed-off-by: somaz <genius5711@gmail.com>
zhoujinsong
left a comment
There was a problem hiding this comment.
LGTM overall — clean, additive change with good test coverage.
A few minor suggestions (non-blocking):
-
Validate
parentRefswhen enabled — If a user setshttpRoute.enabled: truebut forgets to configureparentRefs, the rendered HTTPRoute will be orphaned (not attached to any Gateway). Consider adding a{{- fail }}guard or at minimum marking it as Required in the values comments. -
Whitespace trimming — The template uses
{{ if/{{ end }}instead of{{- if/{{- end }}, which introduces extra blank lines in the rendered output. Other templates in this chart use the trimmed form. -
Default
hostname: amoro.local— This placeholder domain won't resolve in real clusters. Consider defaulting to""(forcing explicit configuration) or adding a bold note that it must be changed.
None of these block the merge. Nice work!
What changes were proposed in this pull request?
This PR adds optional Gateway API
HTTPRoutesupport to thecharts/amoroHelm chart, as an alternative to the existingIngressfor clusters that have standardized on the Gateway API.The change is purely additive — the existing
Ingresstemplate and its tests are untouched, andhttpRoute.enableddefaults tofalse, so existing installations are unaffected.values.yaml: newhttpRouteblock (enabled,parentRefs,hostname,path,pathType,annotations,extraHosts,extraRules), mirroring the shape and## @paramdocumentation of the existingingressblock.templates/amoro-httproute.yaml: new template gated onhttpRoute.enabled, rendering agateway.networking.k8s.io/v1HTTPRoutethat backends to the existing<fullname>-restService (port1630) — the same Service theIngresstargets. It reuses the chart'scommon.names.*,common.labels.standard, andcommon.tplvalues.*helpers.tests/amoro-httproute_test.yaml: 12 helm-unittest cases mirroringamoro-ingress_test.yaml.Why are the changes needed?
Gateway API is the successor to Ingress and is the recommended north-south routing API on many clusters (Istio, Envoy Gateway, Cilium, Kong, …). Users running a Gateway-API-based ingress data plane currently have to hand-write an
HTTPRouteoutside the chart to expose the Amoro dashboard. This lets them do it declaratively through the chart, the same wayingress.enabledworks today.Brief change log
httpRouteparameter block tocharts/amoro/values.yamlcharts/amoro/templates/amoro-httproute.yamlcharts/amoro/tests/amoro-httproute_test.yaml(12 helm-unittest cases)How was this patch tested?
helm unittest charts/amoro— 8 suites / 87 tests pass (12 new HTTPRoute cases + existing suites, no regression).helm lint charts/amoro --set httpRoute.enabled=true— passes.helm templaterendered for three scenarios — disabled (0 documents), enabled withparentRefs+ annotations, and enabled withextraHosts+ custom path/pathType +extraRules— all render as expected and backend to<release>-amoro-rest:1630.Parameters are documented inline via
## @paramcomments invalues.yaml, consistent with how the existingingressparameters are documented (the chartREADME.mddoes not carry a per-parameter table).fix #4242