From 8b338dcb7d946ca6ff94a4746bc7fbdb06c811c4 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Mon, 10 May 2021 12:49:28 +0500 Subject: [PATCH] Only set dnspolicy if explicitly specified --- library/common/2105.0.0/templates/lib/networking/_dns.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/common/2105.0.0/templates/lib/networking/_dns.tpl b/library/common/2105.0.0/templates/lib/networking/_dns.tpl index c95d374616..f177d919f0 100644 --- a/library/common/2105.0.0/templates/lib/networking/_dns.tpl +++ b/library/common/2105.0.0/templates/lib/networking/_dns.tpl @@ -2,9 +2,11 @@ DNS Configuration */}} {{- define "common.networking.dnsConfiguration" }} +{{ if .Values.dnsPolicy }} dnsPolicy: {{ .Values.dnsPolicy }} -{{- if .Values.dnsConfig }} +{{ end }} +{{ if .Values.dnsConfig }} dnsConfig: - {{- toYaml .Values.dnsConfig | nindent 2 }} -{{- end }} + {{ toYaml .Values.dnsConfig | nindent 2 }} +{{ end }} {{- end }}