diff --git a/test/ix-chart/2108.0.0/templates/_networking.tpl b/test/ix-chart/2108.0.0/templates/_networking.tpl index 79a1a325d1..0c93117cbc 100644 --- a/test/ix-chart/2108.0.0/templates/_networking.tpl +++ b/test/ix-chart/2108.0.0/templates/_networking.tpl @@ -8,3 +8,16 @@ dnsConfig: {{- toYaml .Values.dnsConfig | nindent 2 }} {{- end }} {{- end }} + + +{{/* +Get configuration for host network +*/}} +{{- define "hostNetworkingConfiguration" -}} +{{- $host := default false .Values.hostNetwork -}} +{{- if or .Values.externalInterfaces (eq $host false) -}} +{{- print "false" -}} +{{- else -}} +{{- print "true" -}} +{{- end -}} +{{- end -}} diff --git a/test/ix-chart/2108.0.0/templates/_workload.tpl b/test/ix-chart/2108.0.0/templates/_workload.tpl index 344adeda74..6f01bd382f 100644 --- a/test/ix-chart/2108.0.0/templates/_workload.tpl +++ b/test/ix-chart/2108.0.0/templates/_workload.tpl @@ -51,7 +51,7 @@ Pod specification */}} {{- define "podSepc" }} restartPolicy: {{ template "restartPolicy" . }} -hostNetwork: {{ .Values.hostNetwork }} +hostNetwork: {{ template "hostNetworkingConfiguration" . }} containers: - name: {{ .Chart.Name }} {{- include "volumeMountsConfiguration" . | indent 2}}