Skip to content

Commit d6a0f46

Browse files
authored
chart: allow setting allocateLoadBalancerNodePorts (#10585)
Signed-off-by: Philipp Born <[email protected]>
1 parent dc659b2 commit d6a0f46

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

charts/ingress-nginx/templates/controller-service-internal.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ metadata:
1616
namespace: {{ include "ingress-nginx.namespace" . }}
1717
spec:
1818
type: "{{ .Values.controller.service.type }}"
19+
{{- if hasKey .Values.controller.service.internal "allocateLoadBalancerNodePorts" }}
20+
allocateLoadBalancerNodePorts: {{ .Values.controller.service.internal.allocateLoadBalancerNodePorts }}
21+
{{- end }}
1922
{{- if .Values.controller.service.internal.loadBalancerIP }}
2023
loadBalancerIP: {{ .Values.controller.service.internal.loadBalancerIP }}
2124
{{- end }}

charts/ingress-nginx/templates/controller-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ metadata:
1616
namespace: {{ include "ingress-nginx.namespace" . }}
1717
spec:
1818
type: {{ .Values.controller.service.type }}
19+
{{- if hasKey .Values.controller.service "allocateLoadBalancerNodePorts" }}
20+
allocateLoadBalancerNodePorts: {{ .Values.controller.service.allocateLoadBalancerNodePorts }}
21+
{{- end }}
1922
{{- if .Values.controller.service.clusterIP }}
2023
clusterIP: {{ .Values.controller.service.clusterIP }}
2124
{{- end }}

charts/ingress-nginx/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ controller:
455455
## Ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
456456
##
457457
externalIPs: []
458+
# -- Set to false to disable loadbalancer node port allocation
459+
# See https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation
460+
# allocateLoadBalancerNodePorts: true
458461
# -- Used by cloud providers to connect the resulting `LoadBalancer` to a pre-existing static IP according to https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
459462
loadBalancerIP: ""
460463
loadBalancerSourceRanges: []
@@ -510,6 +513,9 @@ controller:
510513
enabled: false
511514
# -- Annotations are mandatory for the load balancer to come up. Varies with the cloud service. Values passed through helm tpl engine.
512515
annotations: {}
516+
# -- Set to false to disable loadbalancer node port allocation
517+
# See https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation
518+
# allocateLoadBalancerNodePorts: true
513519
# -- Used by cloud providers to connect the resulting internal LoadBalancer to a pre-existing static IP. Make sure to add to the service the needed annotation to specify the subnet which the static IP belongs to. For instance, `networking.gke.io/internal-load-balancer-subnet` for GCP and `service.beta.kubernetes.io/aws-load-balancer-subnets` for AWS.
514520
loadBalancerIP: ""
515521
# -- Restrict access For LoadBalancer service. Defaults to 0.0.0.0/0.

0 commit comments

Comments
 (0)