diff --git a/config/helm/aws-node-termination-handler/templates/deployment.yaml b/config/helm/aws-node-termination-handler/templates/deployment.yaml index 889055e2..d2e71157 100644 --- a/config/helm/aws-node-termination-handler/templates/deployment.yaml +++ b/config/helm/aws-node-termination-handler/templates/deployment.yaml @@ -178,13 +178,11 @@ spec: {{- end }} {{- if .Values.enablePrometheusServer }} - containerPort: {{ .Values.prometheusServerPort }} - hostPort: {{ .Values.prometheusServerPort }} name: http-metrics protocol: TCP {{- end }} {{- if .Values.enableProbesServer }} - containerPort: {{ .Values.probesServerPort }} - hostPort: {{ .Values.probesServerPort }} name: liveness-probe protocol: TCP {{- end }} diff --git a/config/helm/aws-node-termination-handler/templates/psp.yaml b/config/helm/aws-node-termination-handler/templates/psp.yaml index c6f28f7d..ea953f8f 100644 --- a/config/helm/aws-node-termination-handler/templates/psp.yaml +++ b/config/helm/aws-node-termination-handler/templates/psp.yaml @@ -12,10 +12,16 @@ spec: hostIPC: false hostNetwork: {{ .Values.useHostNetwork }} hostPID: false -{{- if and .Values.rbac.pspEnabled .Values.enablePrometheusServer }} +{{- if and (and (not .Values.enableSqsTerminationDraining) .Values.useHostNetwork ) (or .Values.enablePrometheusServer .Values.enableProbesServer) }} hostPorts: +{{- if .Values.enablePrometheusServer }} - min: {{ .Values.prometheusServerPort }} max: {{ .Values.prometheusServerPort }} +{{- end }} +{{- if .Values.enableProbesServer }} + - min: {{ .Values.probesServerPort }} + max: {{ .Values.probesServerPort }} +{{- end }} {{- end }} readOnlyRootFilesystem: false allowPrivilegeEscalation: false