k3d icon indicating copy to clipboard operation
k3d copied to clipboard

fix: preserve coredns config during cluster restart

Open cjc7373 opened this issue 8 months ago • 0 comments

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.

cjc7373 avatar Jun 12 '24 09:06 cjc7373