Annotations is pretty useful when you need third-party tool to add additional behavior for a k8s resource.
Lots of auto-discovery tools are based on this annotations.
This PR add the possibility to set tune pod annotations in the node-local-dns daemonsets.app.
As per
3b17e06879,
node-local-dns addon is now builded with latest coreDNS base v1.8 and
that brings great consistency between cache and upstream servers in a
manner of configuration, metrics name convention, etc.
So in this commit, we bump node-local-dns image to latest v1.20.0 which
is build upon latest coreDNS and also add support for overriding this
field.
Signed-off-by: dntosas <ntosas@gmail.com>
This fixes the rendering of the Corefile of the NodeLocal DNSCache
template when setting forwardToKubeDNS to false (or not setting it).
Previously, due to not dereferencing the bool pointer, the Corefile was
always rendered with the true clause, due to checking the address
instead of the actual value of the variable.
With this fix, the templating mechanism will actually respect the value
of forwardToKubeDNS and render it accordingly.
Forcing all DNS communication go through TCP can lead to increased
latency and slower DNS responses since a lot of upstream DNS
servers are not optimized for TCP traffic.
An example is AWS's VPC DNS server that sending all the DNS traffic
through TCP cause it to increase the latencies for this requests.
The kubernetes version has already changed this configmap to skip
force_tcp flag for the . zone, so it makes sense to follow their
example.
Reference https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml#L100