mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #83950 from yastij/update-reset-cni
stop removing cni directories as they aren't installed by kubeadm
This commit is contained in:
commit
4b58ef0e14
@ -81,7 +81,7 @@ func runCleanupNode(c workflow.RunData) error {
|
||||
klog.Warningf("[reset] Failed to remove containers: %v\n", err)
|
||||
}
|
||||
|
||||
r.AddDirsToClean("/etc/cni/net.d", "/var/lib/dockershim", "/var/run/kubernetes", "/var/lib/cni")
|
||||
r.AddDirsToClean("/var/lib/dockershim", "/var/run/kubernetes", "/var/lib/cni")
|
||||
|
||||
// Remove contents from the config and pki directories
|
||||
klog.V(1).Infoln("[reset] Removing contents from the config and pki directories")
|
||||
|
@ -49,6 +49,10 @@ var (
|
||||
The reset process does not clean your kubeconfig files and you must remove them manually.
|
||||
Please, check the contents of the $HOME/.kube/config file.
|
||||
`)
|
||||
|
||||
cniCleanupInstructions = dedent.Dedent(`
|
||||
The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d
|
||||
`)
|
||||
)
|
||||
|
||||
// resetOptions defines all the options exposed via flags by kubeadm reset.
|
||||
@ -179,6 +183,8 @@ func NewCmdReset(in io.Reader, out io.Writer, resetOptions *resetOptions) *cobra
|
||||
data := c.(*resetData)
|
||||
cleanDirs(data)
|
||||
|
||||
// output help text instructing user how to remove cni folders
|
||||
fmt.Print(cniCleanupInstructions)
|
||||
// Output help text instructing user how to remove iptables rules
|
||||
fmt.Print(iptablesCleanupInstructions)
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user