Merge pull request #5249 from aledbf/hostport

Add support for hostPort in Deployment
This commit is contained in:
Kubernetes Prow Robot 2020-03-16 06:26:42 -07:00 committed by GitHub
commit c2c8af28db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View file

@ -137,8 +137,8 @@ spec:
- name: {{ $key }}
containerPort: {{ $value }}
protocol: TCP
{{- if $.Values.controller.daemonset.useHostPort }}
hostPort: {{ index $.Values.controller.daemonset.hostPorts $key | default $value }}
{{- if $.Values.controller.useHostPort }}
hostPort: {{ index $.Values.controller.hostPorts $key | default $value }}
{{- end }}
{{- end }}
{{- if .Values.controller.metrics.enabled }}
@ -155,7 +155,7 @@ spec:
- name: {{ $key }}-tcp
containerPort: {{ $key }}
protocol: TCP
{{- if $.Values.controller.daemonset.useHostPort }}
{{- if $.Values.controller.useHostPort }}
hostPort: {{ $key }}
{{- end }}
{{- end }}
@ -163,7 +163,7 @@ spec:
- name: {{ $key }}-udp
containerPort: {{ $key }}
protocol: UDP
{{- if $.Values.controller.daemonset.useHostPort }}
{{- if $.Values.controller.useHostPort }}
hostPort: {{ $key }}
{{- end }}
{{- end }}