diff --git a/stable/nginx-ingress/Chart.yaml b/stable/nginx-ingress/Chart.yaml index 7049cbac7d8e..955921813ea7 100644 --- a/stable/nginx-ingress/Chart.yaml +++ b/stable/nginx-ingress/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: nginx-ingress -version: 1.19.1 +version: 1.20.0 appVersion: 0.25.1 home: https://github.com/kubernetes/ingress-nginx description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration. diff --git a/stable/nginx-ingress/templates/controller-daemonset.yaml b/stable/nginx-ingress/templates/controller-daemonset.yaml index dfdf0b0b7a9b..70afafdea68c 100644 --- a/stable/nginx-ingress/templates/controller-daemonset.yaml +++ b/stable/nginx-ingress/templates/controller-daemonset.yaml @@ -1,5 +1,6 @@ {{- if or (eq .Values.controller.kind "DaemonSet") (eq .Values.controller.kind "Both") }} {{- $useHostPort := .Values.controller.daemonset.useHostPort -}} +{{- $hostPorts := .Values.controller.daemonset.hostPorts -}} apiVersion: extensions/v1beta1 kind: DaemonSet metadata: @@ -120,18 +121,14 @@ spec: successThreshold: {{ .Values.controller.livenessProbe.successThreshold }} failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }} ports: - - name: http - containerPort: {{ .Values.controller.containerPort.http }} + {{- range $key, $value := .Values.controller.containerPort }} + - name: {{ $key }} + containerPort: {{ $value }} protocol: TCP - {{- if .Values.controller.daemonset.useHostPort }} - hostPort: {{ .Values.controller.daemonset.hostPorts.http }} - {{- end }} - - name: https - containerPort: {{ .Values.controller.containerPort.https }} - protocol: TCP - {{- if .Values.controller.daemonset.useHostPort }} - hostPort: {{ .Values.controller.daemonset.hostPorts.https }} + {{- if $useHostPort }} + hostPort: {{ index $hostPorts $key | default $value }} {{- end }} + {{- end }} {{- if .Values.controller.metrics.enabled }} - name: metrics containerPort: 10254 diff --git a/stable/nginx-ingress/templates/controller-deployment.yaml b/stable/nginx-ingress/templates/controller-deployment.yaml index f9aad9ee86b9..185bfbdb9626 100644 --- a/stable/nginx-ingress/templates/controller-deployment.yaml +++ b/stable/nginx-ingress/templates/controller-deployment.yaml @@ -120,12 +120,11 @@ spec: successThreshold: {{ .Values.controller.livenessProbe.successThreshold }} failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }} ports: - - name: http - containerPort: {{ .Values.controller.containerPort.http }} - protocol: TCP - - name: https - containerPort: {{ .Values.controller.containerPort.https }} + {{- range $key, $value := .Values.controller.containerPort }} + - name: {{ $key }} + containerPort: {{ $value }} protocol: TCP + {{- end }} {{- if .Values.controller.metrics.enabled }} - name: metrics containerPort: 10254 diff --git a/stable/nginx-ingress/values.yaml b/stable/nginx-ingress/values.yaml index 16819d5d6328..71609d5f47a1 100644 --- a/stable/nginx-ingress/values.yaml +++ b/stable/nginx-ingress/values.yaml @@ -15,6 +15,7 @@ controller: containerPort: http: 80 https: 443 + # Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/ config: {}