feat(capacitor-next): add Gateway API HTTPRoute support#403
Open
mhorcajada wants to merge 1 commit into
Open
Conversation
Add native HTTPRoute support to the capacitor-next Helm chart. Changes: - add templates/httproute.yaml - add httpRoute configuration block to values.yaml - support configurable apiVersion and kind - support parentRefs, hostnames, annotations, and matches - default to PathPrefix / when no matches are provided Validated with: - helm lint - helm template - real deployment in cluster using Cilium Gateway API - successful routing through Gateway + HTTPRoute to capacitor-next
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
This PR adds native Gateway API
HTTPRoutesupport to thecapacitor-nextHelm chart.The chart already supports standard
Ingress, but there was no built-in way to generate anHTTPRoute. This made Gateway API deployments require manual resources outside the chart. With Kubernetesv1.36.0recently released, adding first-classHTTPRoutesupport makes the chart easier to use in modern Gateway API based clusters.Closes #384.
What changed
This PR adds:
templates/httproute.yamlhttpRouteconfiguration block invalues.yamlapiVersionandkindannotationshostnamesparentRefsmatchesPathPrefix: /route when no custom matches are providedThe implementation keeps
Ingresssupport unchanged by default and only renders anHTTPRoutewhenhttpRoute.enabled=true.Example configuration
Example Gateway listener
Validation
This was validated with:
helm linthelm templateGateway -> HTTPRoute -> Service -> PodEnvironment note for Cilium 1.19.3
In the test environment, Cilium
v1.19.3also required the experimentalTLSRouteCRD because the operator expectedgateway.networking.k8s.io/v1alpha2forTLSRoute.The required command was:
This is an environment-specific requirement and is not part of the chart change itself.
Deployment note
In the test environment,
capacitor-nextwas deployed influx-system, which already had restrictiveNetworkPolicyobjects. The chart change itself worked correctly, but traffic from the Gateway only succeeded after allowing ingress to thecapacitor-nextpods on port8080.Example policy used in that environment:
This is an environment-specific operational note, not a required chart change.
Why this approach
The implementation follows the same pattern used successfully in other charts:
HTTPRouteonly when explicitly enabledServiceIngressbehavior unless the user opts inBackward compatibility
httpRoute.enabled=trueIngressusers are unaffected