diff --git a/charts/nginx-ingress/README.md b/charts/nginx-ingress/README.md index c9990b61d1..44b614af81 100644 --- a/charts/nginx-ingress/README.md +++ b/charts/nginx-ingress/README.md @@ -419,11 +419,11 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont |`controller.service.customPorts` | A list of custom ports to expose through the Ingress Controller service. Follows the conventional Kubernetes yaml syntax for service ports. | [] | |`controller.service.httpPort.enable` | Enables the HTTP port for the Ingress Controller service. | true | |`controller.service.httpPort.port` | The HTTP port of the Ingress Controller service. | 80 | -|`controller.service.httpPort.nodePort` | The custom NodePort for the HTTP port. Requires `controller.service.type` set to `NodePort`. | "" | +|`controller.service.httpPort.nodePort` | The custom NodePort for the HTTP port. Requires `controller.service.type` set to `NodePort` or `LoadBalancer`. | "" | |`controller.service.httpPort.targetPort` | The target port of the HTTP port of the Ingress Controller service. | 80 | |`controller.service.httpsPort.enable` | Enables the HTTPS port for the Ingress Controller service. | true | |`controller.service.httpsPort.port` | The HTTPS port of the Ingress Controller service. | 443 | -|`controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort`. | "" | +|`controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort` or `LoadBalancer`. | "" | |`controller.service.httpsPort.targetPort` | The target port of the HTTPS port of the Ingress Controller service. | 443 | |`controller.serviceAccount.annotations` | The annotations of the Ingress Controller service account. | {} | |`controller.serviceAccount.name` | The name of the service account of the Ingress Controller pods. Used for RBAC. | Autogenerated | diff --git a/charts/nginx-ingress/templates/controller-service.yaml b/charts/nginx-ingress/templates/controller-service.yaml index a25de94561..405aa0e24f 100644 --- a/charts/nginx-ingress/templates/controller-service.yaml +++ b/charts/nginx-ingress/templates/controller-service.yaml @@ -50,7 +50,7 @@ spec: targetPort: {{ .Values.controller.service.httpPort.targetPort }} protocol: TCP name: http - {{- if eq .Values.controller.service.type "NodePort" }} + {{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }} nodePort: {{ .Values.controller.service.httpPort.nodePort }} {{- end }} {{- end }} @@ -59,7 +59,7 @@ spec: targetPort: {{ .Values.controller.service.httpsPort.targetPort }} protocol: TCP name: https - {{- if eq .Values.controller.service.type "NodePort" }} + {{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }} nodePort: {{ .Values.controller.service.httpsPort.nodePort }} {{- end }} {{- end }} diff --git a/charts/nginx-ingress/values.yaml b/charts/nginx-ingress/values.yaml index e381a58ba3..b77f670eae 100644 --- a/charts/nginx-ingress/values.yaml +++ b/charts/nginx-ingress/values.yaml @@ -436,7 +436,7 @@ controller: ## The HTTP port of the Ingress Controller service. port: 80 - ## The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort. + ## The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort or LoadBalancer. # nodePort: 80 ## The HTTP port on the POD where the Ingress Controller service is running. @@ -449,7 +449,7 @@ controller: ## The HTTPS port of the Ingress Controller service. port: 443 - ## The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort. + ## The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort or LoadBalancer. # nodePort: 443 ## The HTTPS port on the POD where the Ingress Controller service is running.