From 039b3cdc000d9868eb867f9afef11e55507c340a Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 27 Sep 2017 02:42:59 +0300 Subject: [PATCH] kubeadm-reset: notify about a non-default certificates directory Show the following warning when the user passes --cert-dir: [reset] WARNING: Cleaning a non-default certificates directory: The motivation for this change is to notify the user of the certificates directory which is about to be cleaned as a "warning" instead of just listing it next to the rest of the directories to be cleaned. Makes sure that the user is properly notified that he/she has passed a non-default path for cleanup. Signed-off-by: Lubomir I. Ivanov --- cmd/kubeadm/app/cmd/reset.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index 7b73b074cf9..8b86b221961 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -133,6 +133,9 @@ func (r *Reset) Run(out io.Writer) error { } // Remove contents from the config and pki directories + if r.certsDir != kubeadmapiext.DefaultCertificatesDir { + fmt.Printf("[reset] WARNING: Cleaning a non-default certificates directory: %q\n", r.certsDir) + } resetConfigDir(kubeadmconstants.KubernetesDir, r.certsDir) return nil