Custom agent/etc/containerd/certs.d/*
files are deleted by k3s on startup
#10787
Milestone
agent/etc/containerd/certs.d/*
files are deleted by k3s on startup
#10787
Environmental Info:
k3s version v1.30.4+k3s1 (98262b5)
go version go1.22.5
Node(s) CPU architecture, OS, and Version:
doesn't matter
Cluster Configuration:
doesn't matter
Describe the bug:
During generation of the containerd hosts config, the
agent/etc/containerd/certs.d
directory is completely deleted.This happens here:
k3s/pkg/agent/containerd/config.go
Line 49 in fa6940d
Steps To Reproduce:
agent/etc/containerd/certs.d
folderExpected behavior:
I should be able to provide my own configs because I need full control over
capabilities
etc.Actual behavior:
My own configs are deleted.
Additional context / logs:
At first glance I was thinking "why is there a os.RemoveAll in the code" but I can understand why this was implemented like this.
The
writeContainerdHosts
function needs to support deleting outdated files from previous configurations.So my idea how to fix this would be instead of deleting all files, list all files and check if they start with
# File generated by k3s. DO NOT EDIT.
. And only delete them if they do.What do you think?
Also, unfortunately its not possible to supply multiple
config_path
because then containerd won't start.The text was updated successfully, but these errors were encountered: