Skip to content

Commit 9e26bbf

Browse files
committed
feat: add the ability to configure dnsPolicy on deployment (#733)
1 parent 9d1e3a6 commit 9e26bbf

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

charts/telegraf/templates/deployment.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ spec:
2828
{{ toYaml .Values.podAnnotations | indent 8 }}
2929
{{- end }}
3030
spec:
31+
{{- if .Values.dnsPolicy }}
32+
dnsPolicy:
33+
{{ toYaml .Values.dnsPolicy | indent 8}}
34+
{{- end }}
35+
{{- if and .Values.dnsConfig .Values.dnsConfig.nameservers }}
36+
dnsConfig:
37+
nameservers:
38+
{{ toYaml .Values.dnsConfig.nameservers | indent 10}}
39+
{{- end }}
40+
{{- if and .Values.dnsConfig .Values.dnsConfig.searches }}
41+
searches:
42+
{{ toYaml .Values.dnsConfig.searches | indent 10}}
43+
{{- end }}
44+
{{- if and .Values.dnsConfig .Values.dnsConfig.options }}
45+
options:
46+
{{ toYaml .Values.dnsConfig.options | indent 10}}
47+
{{- end }}
3148
{{- if .Values.securityContext }}
3249
securityContext:
3350
{{ toYaml .Values.securityContext | indent 8 }}
@@ -126,4 +143,4 @@ spec:
126143
name: {{ include "telegraf.fullname" . }}
127144
{{- if .Values.volumes }}
128145
{{ toYaml .Values.volumes | indent 6 }}
129-
{{- end }}
146+
{{- end }}

0 commit comments

Comments
 (0)