Guard Gateway API route templates with service enabled checks
What does this MR do?
Guard Gateway API route templates with service enabled checks.
When a service (e.g. KAS) is disabled, its corresponding Kubernetes Service does not exist. However, the Gateway API route resources (HTTPRoute, TCPRoute, BackendTrafficPolicy) were still being rendered, causing the Gateway to continuously report errors because the HTTPRoute references a non-existent Service backend. The error message from traefik as gateway handler:
{"level":"error","providerName":"kubernetesgateway","http_route":"gitlab-kas","namespace":"gitlab","time":"2026-03-31T06:06:09Z","message":"Unable to load HTTPRoute backend: Cannot load HTTPBackendRef gitlab/gitlab-kas: getting service: service "gitlab-kas" not found"}
This MR wraps each route template with an additional `enabled` condition check, so that route resources are only created when their corresponding service is actually enabled.
Related issues
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
- Documentation created/updated.
- Tests added/updated, and test plan for scenarios not covered by automated tests.
- Equivalent MR/issue for omnibus-gitlab opened.
Reviewers checklist
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.