Description
As part of the 2.0 architecture changeset, we can simply add this field to the existing Service fields.
Acceptance
- Service loadBalancerClass field is configurable via NginxProxy resource and helm chart in the cp/dp feature branch.
Discussed in #3302
Originally posted by RouxAntoine April 16, 2025
Background
I want to use the nginx-gateway-fabric in a on-premises environment the fact is that there is no default loadBalancerClass in this cluster, So no ip is assign to my services.
Proposal
I propose to enhance the Helm chart by adding support for loadBalancerClass in the service specification. This addition will allow users to define class name of loadbalancer controller that can handle the service, support multiple loadbalancer controller in a same cluster.
Implementation
The addition involves updating the service.yaml template to include a conditional check for loadBalancerClass values and append them to the service spec if provided. The values.yaml file will also need to be updated to include a default empty configuration for backward compatibility.
Example:
In values.yaml, users could specify:
service:
type: LoadBalancer
loadBalancerClass: metallb
This list would be utilized in service.yaml as:
spec:
{{- if .Values.service.loadBalancerClass }}
loadBalancerClass: {{ .Values.service.loadBalancerClass }}
{{- end }}
Benefits
- Usability: support cluster without default loadbalancer class.
- Flexibility: allow different loadbalancer class for different nginx-gateway-fabric deployment.
Seeking Feedback
I would appreciate feedback on everything.
Contribution Offer
I could do the pull request :)
My pull request would be highly inspired by this one
Metadata
Metadata
Assignees
Labels
Type
Projects
Status