Skip to content

Add ability to set loadBalancerClass for load balancer Service #3303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sjberman opened this issue Apr 16, 2025 · 0 comments
Open

Add ability to set loadBalancerClass for load balancer Service #3303

sjberman opened this issue Apr 16, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented. size/extra-small Estimated to be completed within a day
Milestone

Comments

@sjberman
Copy link
Collaborator

sjberman commented Apr 16, 2025

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

@sjberman sjberman added the enhancement New feature or request label Apr 16, 2025
@sjberman sjberman added this to the v2.0.0 milestone Apr 16, 2025
@sjberman sjberman assigned sjberman and unassigned sjberman Apr 16, 2025
@sjberman sjberman changed the title Add loadBalancerClass to Helm Chart Add ability to set loadBalancerClass for load balancer Service Apr 16, 2025
@sjberman sjberman added refined Requirements are refined and the issue is ready to be implemented. size/small Estimated to be completed within ~2 days size/extra-small Estimated to be completed within a day and removed size/small Estimated to be completed within ~2 days labels Apr 16, 2025
@bjee19 bjee19 self-assigned this Apr 22, 2025
@bjee19 bjee19 moved this from 🆕 New to 🏗 In Progress in NGINX Gateway Fabric Apr 22, 2025
@bjee19 bjee19 moved this from 🏗 In Progress to 👀 In Review in NGINX Gateway Fabric Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented. size/extra-small Estimated to be completed within a day
Projects
Status: 👀 In Review
Development

No branches or pull requests

2 participants