diff --git a/charts/ingress-nginx/README.md b/charts/ingress-nginx/README.md index 4a3bbbd48..022cb656b 100644 --- a/charts/ingress-nginx/README.md +++ b/charts/ingress-nginx/README.md @@ -81,9 +81,9 @@ Parameter | Description | Default `controller.autoscaling.maxReplicas` | If autoscaling enabled, this field sets maximum replica count | `11` `controller.autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage to scale | `"50"` `controller.autoscaling.targetMemoryUtilizationPercentage` | Target memory utilization percentage to scale | `"50"` -`controller.daemonset.useHostPort` | If `controller.kind` is `DaemonSet`, this will enable `hostPort` for TCP/80 and TCP/443 | false -`controller.daemonset.hostPorts.http` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"80"` -`controller.daemonset.hostPorts.https` | If `controller.daemonset.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"443"` +`controller.useHostPort` | If `controller.kind` is `DaemonSet`, this will enable `hostPort` for TCP/80 and TCP/443 | false +`controller.hostPorts.http` | If `controller.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"80"` +`controller.hostPorts.https` | If `controller.useHostPort` is `true` and this is non-empty, it sets the hostPort | `"443"` `controller.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` `controller.affinity` | node/pod affinities (requires Kubernetes >=1.6) | `{}` `controller.terminationGracePeriodSeconds` | how many seconds to wait before terminating a pod | `60` @@ -101,7 +101,7 @@ Parameter | Description | Default `controller.service.labels` | labels for controller service | `{}` `controller.publishService.enabled` | if true, the controller will set the endpoint records on the ingress objects to reflect those on the service | `false` `controller.publishService.pathOverride` | override of the default publish-service name | `""` -`controller.service.enabled` | if disabled no service will be created. This is especially useful when `controller.kind` is set to `DaemonSet` and `controller.daemonset.useHostPorts` is `true` | true +`controller.service.enabled` | if disabled no service will be created. This is especially useful when `controller.kind` is set to `DaemonSet` and `controller.useHostPorts` is `true` | true `controller.service.clusterIP` | internal controller cluster service IP (set to `"-"` to pass an empty value) | `nil` `controller.service.omitClusterIP` | (Deprecated) To omit the `clusterIP` from the controller service | `false` `controller.service.externalIPs` | controller service external IP addresses. Do not set this when `controller.hostNetwork` is set to `true` and `kube-proxy` is used as there will be a port-conflict for port `80` | `[]` diff --git a/charts/ingress-nginx/templates/controller-daemonset.yaml b/charts/ingress-nginx/templates/controller-daemonset.yaml index 6decaf700..fe5252f35 100644 --- a/charts/ingress-nginx/templates/controller-daemonset.yaml +++ b/charts/ingress-nginx/templates/controller-daemonset.yaml @@ -134,8 +134,8 @@ spec: - name: {{ $key }} containerPort: {{ $value }} protocol: TCP - {{- if $.Values.controller.daemonset.useHostPort }} - hostPort: {{ index $.Values.controller.daemonset.hostPorts $key | default $value }} + {{- if $.Values.controller.useHostPort }} + hostPort: {{ index $.Values.controller.hostPorts $key | default $value }} {{- end }} {{- end }} {{- if .Values.controller.metrics.enabled }} @@ -152,7 +152,7 @@ spec: - name: {{ $key }}-tcp containerPort: {{ $key }} protocol: TCP - {{- if $.Values.controller.daemonset.useHostPort }} + {{- if $.Values.controller.useHostPort }} hostPort: {{ $key }} {{- end }} {{- end }} @@ -160,7 +160,7 @@ spec: - name: {{ $key }}-udp containerPort: {{ $key }} protocol: UDP - {{- if $.Values.controller.daemonset.useHostPort }} + {{- if $.Values.controller.useHostPort }} hostPort: {{ $key }} {{- end }} {{- end }} diff --git a/charts/ingress-nginx/templates/controller-deployment.yaml b/charts/ingress-nginx/templates/controller-deployment.yaml index 742251afc..278733372 100644 --- a/charts/ingress-nginx/templates/controller-deployment.yaml +++ b/charts/ingress-nginx/templates/controller-deployment.yaml @@ -137,6 +137,9 @@ spec: - name: {{ $key }} containerPort: {{ $value }} protocol: TCP + {{- if $.Values.controller.useHostPort }} + hostPort: {{ index $.Values.controller.hostPorts $key | default $value }} + {{- end }} {{- end }} {{- if .Values.controller.metrics.enabled }} - name: metrics