k3d
k3d copied to clipboard
fix: preserve coredns config during cluster restart
What
fixes #1221
Why
Since coredns
configmap will be reverted to original state during k3s startup process, this PR utilizes coredns-custom
configmap (introduced in k3s-io/k3s#4397) to persistent custom coredns configs (e.g. the host.k3d.internal
record).
Since coredns's host
plugin can only be used once per server block, I have to use the file
plugin.
A go template is used to render the configmap. I don't know if there's a better way.
Implications
Not I'm aware of.