Skip to content

Commit 31a5a99

Browse files
authored
helm: Use hostPort only with hostNetwork (#456)
There is no need to use the hostPort option if we are not directly connected to the hostNetwork. Using the hostPort option makes that port unavailable for binding to any other service on the node which is not really desirable if the pod itself is not on the host network.
1 parent 84b4d90 commit 31a5a99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,18 @@ spec:
183183
{{- if .Values.enablePrometheusServer }}
184184
ports:
185185
- containerPort: {{ .Values.prometheusServerPort }}
186+
{{- if .Values.useHostNetwork }}
186187
hostPort: {{ .Values.prometheusServerPort }}
188+
{{- end }}
187189
name: http-metrics
188190
protocol: TCP
189191
{{- end }}
190192
{{- if .Values.enableProbesServer }}
191193
ports:
192194
- containerPort: {{ .Values.probesServerPort }}
195+
{{- if .Values.useHostNetwork }}
193196
hostPort: {{ .Values.probesServerPort }}
197+
{{- end }}
194198
name: liveness-probe
195199
protocol: TCP
196200
{{- end }}

0 commit comments

Comments
 (0)