[stable/nginx-ingress] Add fine-grained host port range in psp (#19858)

Give port-by-port permission in psp to improve security.

Signed-off-by: Yu Chih <secret104278@gmail.com>
This commit is contained in:
pinepinebrook
2020-01-08 08:05:40 -08:00
committed by Kubernetes Prow Robot
parent 61c2cc0db4
commit 46a84098c8
2 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: nginx-ingress
version: 1.28.0
version: 1.28.1
appVersion: 0.26.2
home: https://github.com/kubernetes/ingress-nginx
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
@@ -21,6 +21,34 @@ spec:
- 'secret'
#- 'downwardAPI'
hostNetwork: {{ .Values.controller.hostNetwork }}
{{- if .Values.controller.hostNetwork }}
hostPorts:
{{- range $key, $value := .Values.controller.containerPort }}
# {{ $key }}
- min: {{ $value }}
max: {{ $value }}
{{- end }}
{{- if .Values.controller.metrics.enabled }}
# metrics
- min: {{ .Values.controller.metrics.port }}
max: {{ .Values.controller.metrics.port }}
{{- end }}
{{- if .Values.controller.admissionWebhooks.enabled }}
# admission webhooks
- min: {{ .Values.controller.admissionWebhooks.port }}
max: {{ .Values.controller.admissionWebhooks.port }}
{{- end }}
{{- range $key, $value := .Values.tcp }}
# {{ $key }}-tcp
- min: {{ $key }}
max: {{ $key }}
{{- end }}
{{- range $key, $value := .Values.udp }}
# {{ $key }}-udp
- min: {{ $key }}
max: {{ $key }}
{{- end }}
{{- end }}
hostIPC: false
hostPID: false
runAsUser: