Skip to content

Conversation

@rodrigosandrin
Copy link

@rodrigosandrin rodrigosandrin commented Nov 20, 2025

Proposed changes

Add support to loadBalancerClass in helm chart.

Issue:
#8441

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@rodrigosandrin rodrigosandrin requested a review from a team as a code owner November 20, 2025 19:26
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added the enhancement Pull requests for new features/feature enhancements label Nov 20, 2025
@rodrigosandrin
Copy link
Author

I have hereby read the F5 CLA and agree to its terms

@rodrigosandrin rodrigosandrin force-pushed the feat/support-load-balance-class-helm branch from 48538f5 to 9898915 Compare November 20, 2025 19:46
@rodrigosandrin
Copy link
Author

Tests:

value.yaml:

controller:
  service:
    loadBalancerClass: antrea

tested with values

helm install tst1 ./charts/nginx-ingress/ -f value.yaml:

result:

apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: tst1
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2025-11-20T19:54:06Z"
  labels:
    app.kubernetes.io/instance: tst1
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: nginx-ingress
    app.kubernetes.io/version: 5.3.0
    helm.sh/chart: nginx-ingress-2.4.0
  name: tst1-nginx-ingress-controller
  namespace: default
  resourceVersion: "887"
  uid: 409c2c3d-3963-43ba-b371-f515de905b2e
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 10.96.1.47
  clusterIPs:
  - 10.96.1.47
  externalTrafficPolicy: Local
  healthCheckNodePort: 30169
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  loadBalancerClass: antrea
  ports:
  - name: http
    nodePort: 32123
    port: 80
    protocol: TCP
    targetPort: 80
  - name: https
    nodePort: 32391
    port: 443
    protocol: TCP
    targetPort: 443
  selector:
    app.kubernetes.io/instance: tst1
    app.kubernetes.io/name: nginx-ingress
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

tested with no values:

helm install tst ./charts/nginx-ingress/

result:

apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: tst
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2025-11-20T19:59:10Z"
  labels:
    app.kubernetes.io/instance: tst
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: nginx-ingress
    app.kubernetes.io/version: 5.3.0
    helm.sh/chart: nginx-ingress-2.4.0
  name: tst-nginx-ingress-controller
  namespace: default
  resourceVersion: "1486"
  uid: 7658f4e5-a2c4-4fb0-a491-b5b95717c2bd
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 10.96.91.8
  clusterIPs:
  - 10.96.91.8
  externalTrafficPolicy: Local
  healthCheckNodePort: 31856
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    nodePort: 30372
    port: 80
    protocol: TCP
    targetPort: 80
  - name: https
    nodePort: 31787
    port: 443
    protocol: TCP
    targetPort: 443
  selector:
    app.kubernetes.io/instance: tst
    app.kubernetes.io/name: nginx-ingress
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

@haywoodsh
Copy link
Contributor

It would be great if you can include your test results in the helm tests https://github.com/nginx/kubernetes-ingress/blob/main/charts/tests/helmunit_test.go

@github-actions github-actions bot added the go Pull requests that update Go code label Dec 2, 2025
@rodrigosandrin
Copy link
Author

It would be great if you can include your test results in the helm tests https://github.com/nginx/kubernetes-ingress/blob/main/charts/tests/helmunit_test.go

I added the test, i didn't find a doc to guide how to add tests, but I think I did it right. Can you double-check to make sure everything is alright?

After adding tests, I ran:

make test

Result:

go test -tags=aws,helmunit -shuffle=on ./...
ok      github.com/nginx/kubernetes-ingress/charts/tests        30.322s

@AlexFenlon
Copy link
Contributor

Thanks @rodrigosandrin for adding these!

No docs on how to do tests but what you have done looks good!

We will review when we have a chance!

@nxf5025
Copy link

nxf5025 commented Dec 16, 2025

Also interested in this. Anything I can do to help get it merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Pull requests for new features/feature enhancements go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants