[stable/nginx-ingress] fix psp for daemonsets with userHostPort (#20764)

Signed-off-by: fpicot <francois.picot@homesend.com>
This commit is contained in:
François Picot
2020-02-15 03:07:27 -08:00
committed by GitHub
parent af4e3b1324
commit c10dd592a0
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx-ingress
version: 1.30.2
version: 1.30.3
appVersion: 0.28.0
home: https://github.com/kubernetes/ingress-nginx
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
@@ -21,13 +21,21 @@ spec:
- 'secret'
#- 'downwardAPI'
hostNetwork: {{ .Values.controller.hostNetwork }}
{{- if .Values.controller.hostNetwork }}
{{- if or .Values.controller.hostNetwork .Values.controller.daemonset.useHostPort }}
hostPorts:
{{- if .Values.controller.hostNetwork }}
{{- range $key, $value := .Values.controller.containerPort }}
# {{ $key }}
- min: {{ $value }}
max: {{ $value }}
{{- end }}
{{- else if .Values.controller.daemonset.useHostPort }}
{{- range $key, $value := .Values.controller.daemonset.hostPorts }}
# {{ $key }}
- min: {{ $value }}
max: {{ $value }}
{{- end }}
{{- end }}
{{- if .Values.controller.metrics.enabled }}
# metrics
- min: {{ .Values.controller.metrics.port }}