Remove duplicated annotations definition and refactor hostPort configuration

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-04-06 19:01:52 -04:00
parent 83dacebfb5
commit 1f3eac2c8c
8 changed files with 51 additions and 70 deletions

View file

@ -21,7 +21,7 @@ spec:
{{- if .Values.controller.hostNetwork }}
hostNetwork: {{ .Values.controller.hostNetwork }}
{{- end }}
{{- if or .Values.controller.hostNetwork .Values.controller.daemonset.useHostPort }}
{{- if or .Values.controller.hostNetwork .Values.controller.hostPort.enabled }}
hostPorts:
{{- if .Values.controller.hostNetwork }}
{{- range $key, $value := .Values.controller.containerPort }}
@ -29,8 +29,8 @@ spec:
- min: {{ $value }}
max: {{ $value }}
{{- end }}
{{- else if .Values.controller.daemonset.useHostPort }}
{{- range $key, $value := .Values.controller.daemonset.hostPorts }}
{{- else if .Values.controller.hostPort.enabled }}
{{- range $key, $value := .Values.controller.hostPort.ports }}
# {{ $key }}
- min: {{ $value }}
max: {{ $value }}