Skip to content

Commit 2e5fd64

Browse files
authored
[Helm] Choose NodePort values for controller.service.type = LoadBalancer (#5335)
1 parent fa73a1d commit 2e5fd64

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

charts/nginx-ingress/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,11 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
419419
|`controller.service.customPorts` | A list of custom ports to expose through the Ingress Controller service. Follows the conventional Kubernetes yaml syntax for service ports. | [] |
420420
|`controller.service.httpPort.enable` | Enables the HTTP port for the Ingress Controller service. | true |
421421
|`controller.service.httpPort.port` | The HTTP port of the Ingress Controller service. | 80 |
422-
|`controller.service.httpPort.nodePort` | The custom NodePort for the HTTP port. Requires `controller.service.type` set to `NodePort`. | "" |
422+
|`controller.service.httpPort.nodePort` | The custom NodePort for the HTTP port. Requires `controller.service.type` set to `NodePort` or `LoadBalancer`. | "" |
423423
|`controller.service.httpPort.targetPort` | The target port of the HTTP port of the Ingress Controller service. | 80 |
424424
|`controller.service.httpsPort.enable` | Enables the HTTPS port for the Ingress Controller service. | true |
425425
|`controller.service.httpsPort.port` | The HTTPS port of the Ingress Controller service. | 443 |
426-
|`controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort`. | "" |
426+
|`controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort` or `LoadBalancer`. | "" |
427427
|`controller.service.httpsPort.targetPort` | The target port of the HTTPS port of the Ingress Controller service. | 443 |
428428
|`controller.serviceAccount.annotations` | The annotations of the Ingress Controller service account. | {} |
429429
|`controller.serviceAccount.name` | The name of the service account of the Ingress Controller pods. Used for RBAC. | Autogenerated |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
targetPort: {{ .Values.controller.service.httpPort.targetPort }}
5151
protocol: TCP
5252
name: http
53-
{{- if eq .Values.controller.service.type "NodePort" }}
53+
{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
5454
nodePort: {{ .Values.controller.service.httpPort.nodePort }}
5555
{{- end }}
5656
{{- end }}
@@ -59,7 +59,7 @@ spec:
5959
targetPort: {{ .Values.controller.service.httpsPort.targetPort }}
6060
protocol: TCP
6161
name: https
62-
{{- if eq .Values.controller.service.type "NodePort" }}
62+
{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
6363
nodePort: {{ .Values.controller.service.httpsPort.nodePort }}
6464
{{- end }}
6565
{{- end }}

charts/nginx-ingress/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ controller:
436436
## The HTTP port of the Ingress Controller service.
437437
port: 80
438438

439-
## The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort.
439+
## The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort or LoadBalancer.
440440
# nodePort: 80
441441

442442
## The HTTP port on the POD where the Ingress Controller service is running.
@@ -449,7 +449,7 @@ controller:
449449
## The HTTPS port of the Ingress Controller service.
450450
port: 443
451451

452-
## The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort.
452+
## The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort or LoadBalancer.
453453
# nodePort: 443
454454

455455
## The HTTPS port on the POD where the Ingress Controller service is running.

0 commit comments

Comments
 (0)