mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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: <dir_name> 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 <lubomirivanov@vmware.com>
This commit is contained in:
parent
e1d923a7cb
commit
039b3cdc00
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user