haproxy: add service name override - #382
Merged
Merged
Conversation
Signed-off-by: Konstantin Kelemen <konstantin@kel.mn>
konstantin-kelemen
force-pushed
the
main
branch
from
September 9, 2026 13:09
2e3fd84 to
e7668bc
Compare
Signed-off-by: Konstantin Kelemen <konstantin@kel.mn>
The service.name fallback was spelled out at all four references to the Service (service.yaml, both ingress.yaml API branches, httproute.yaml), so any template added later would silently regress to the fullname and the two ingress branches had to be kept in sync by hand. Move it into a haproxy.serviceName helper alongside the existing name helpers. Quote the rendered name as well. Kubernetes parses manifests with YAML 1.1 semantics, so a valid DNS-1035 Service name such as "on", "off", "yes" or "no" was coerced to a boolean and the object rejected with "cannot unmarshal !!bool into string". Claude-Session: https://claude.ai/code/session_013MqRHADUTm6nBGw7G4WP9W Signed-off-by: Dinko Korunic <dkorunic@haproxy.com>
The comment claimed the default was .Release.Name, but the Service is named after haproxy.fullname, ie. "<release>-haproxy". It also used a trailing comment where the rest of the block documents keys above them. Add the caveat that renaming the Service of an existing release replaces it rather than updating it in place: the ClusterIP changes and, with type LoadBalancer, the cloud provider provisions a new load balancer with a new external address. Claude-Session: https://claude.ai/code/session_013MqRHADUTm6nBGw7G4WP9W Signed-off-by: Dinko Korunic <dkorunic@haproxy.com>
Nothing under haproxy/ci/ set service.name, so the consistency between the Service and the Ingress backend it is referenced from was never asserted by local-test.sh or the integration-test.sh ci scenario. httpRoute is left disabled: install_charts.sh only brings up the Gateway API CRDs for the charts that need cloud-provider-kind, and httproute.yaml has no .Capabilities.APIVersions gate, so enabling it here would break ct install. That path is still rendered offline by local-test.sh. Claude-Session: https://claude.ai/code/session_013MqRHADUTm6nBGw7G4WP9W Signed-off-by: Dinko Korunic <dkorunic@haproxy.com>
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.
We need to have an ability to change the name of the service to have meaningful DNS records for services in the cluster.
For example, currently we can only have something like this:
haproxy.haproxy.svc.cluster.local.Instead we want to name the service differently, to have something like
apps.haproxy.svc.cluster.local.This PR adds that feature.