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:
Kubernetes Prow Robot 2019-10-17 03:19:02 -07:00 committed by GitHub
commit 4b58ef0e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -81,7 +81,7 @@ func runCleanupNode(c workflow.RunData) error {
klog.Warningf("[reset] Failed to remove containers: %v\n", err) 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 // Remove contents from the config and pki directories
klog.V(1).Infoln("[reset] Removing contents from the config and pki directories") klog.V(1).Infoln("[reset] Removing contents from the config and pki directories")

View File

@ -49,6 +49,10 @@ var (
The reset process does not clean your kubeconfig files and you must remove them manually. 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. 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. // 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) data := c.(*resetData)
cleanDirs(data) 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 // Output help text instructing user how to remove iptables rules
fmt.Print(iptablesCleanupInstructions) fmt.Print(iptablesCleanupInstructions)
return nil return nil