mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-06 14:37:45 +08:00
Upd: Allow for setting the DNS policy for the pod
This commit is contained in:
parent
b90b336d04
commit
d300d9b401
3 changed files with 50 additions and 0 deletions
|
@ -176,6 +176,32 @@ spec:
|
|||
{{- if .Values.extraContainers }}
|
||||
{{- tpl .Values.extraContainers $root | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.dns.policy }}
|
||||
dnsPolicy: {{- .Values.dns.policy }}
|
||||
{{- end }}
|
||||
{{- if or .Values.dns.nameservers .Values.dns.searches .Values.dns.options }}
|
||||
dnsConfig:
|
||||
{{- if .Values.dns.nameservers }}
|
||||
nameservers:
|
||||
{{- range .Values.dns.nameservers }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.dns.searches }}
|
||||
searches: {{- .Values.dns.searches | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.dns.options }}
|
||||
options:
|
||||
{{- range .Values.dns.options }}
|
||||
{{- if .name }}
|
||||
- name: {{ .name }}
|
||||
{{- if .value }}
|
||||
value: {{ .value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.certs.create }}
|
||||
- name: certs-init
|
||||
|
|
|
@ -169,6 +169,20 @@ config:
|
|||
# e.g.
|
||||
# RequireSafeKeys: "yes"
|
||||
|
||||
dns:
|
||||
policy: ""
|
||||
# policy: "None"
|
||||
nameservers: {}
|
||||
# - 8.8.8.8
|
||||
# - 8.8.4.4
|
||||
searches: ""
|
||||
# searches: "default.svc.cluster.local svc.cluster.local cluster.local"
|
||||
options: {}
|
||||
# options:
|
||||
# ndots:
|
||||
# - name: ndots
|
||||
# value: "5"
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
|
|
10
helm/test_14_test_dns_policy.yml
Normal file
10
helm/test_14_test_dns_policy.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
dns:
|
||||
policy: "None"
|
||||
nameservers:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
searches: "default.svc.cluster.local svc.cluster.local cluster.local"
|
||||
options:
|
||||
ndots:
|
||||
- name: ndots
|
||||
value: "5"
|
Loading…
Add table
Reference in a new issue