nodelocaldns: allow binding metrics address to host IP (#7748)

This commit is contained in:
Cristian Calin
2021-06-29 15:28:41 +03:00
committed by GitHub
parent e3850fbbbc
commit bd6d810d0a
4 changed files with 14 additions and 5 deletions

View File

@@ -41,6 +41,13 @@ spec:
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns" ]
securityContext:
privileged: true
{% if nodelocaldns_bind_metrics_host_ip %}
env:
- name: MY_HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{% endif %}
ports:
- containerPort: 53
name: dns