mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
UX improvement for preflight check for external etcd client certificates
By using same preflight check label for all etcd client certificates, it will allow user to use single identifier, and as result shorter command line arguments to kubeadm, in case multiple issues found with those files. Fixes: kubernetes/kubeadm#834
This commit is contained in:
@@ -892,13 +892,13 @@ func RunInitMasterChecks(execer utilsexec.Interface, cfg *kubeadmapi.MasterConfi
|
||||
if cfg.Etcd.External != nil {
|
||||
// Only check etcd version when external endpoints are specified
|
||||
if cfg.Etcd.External.CAFile != "" {
|
||||
checks = append(checks, FileExistingCheck{Path: cfg.Etcd.External.CAFile})
|
||||
checks = append(checks, FileExistingCheck{Path: cfg.Etcd.External.CAFile, Label: "ExternalEtcdClientCertificates"})
|
||||
}
|
||||
if cfg.Etcd.External.CertFile != "" {
|
||||
checks = append(checks, FileExistingCheck{Path: cfg.Etcd.External.CertFile})
|
||||
checks = append(checks, FileExistingCheck{Path: cfg.Etcd.External.CertFile, Label: "ExternalEtcdClientCertificates"})
|
||||
}
|
||||
if cfg.Etcd.External.KeyFile != "" {
|
||||
checks = append(checks, FileExistingCheck{Path: cfg.Etcd.External.KeyFile})
|
||||
checks = append(checks, FileExistingCheck{Path: cfg.Etcd.External.KeyFile, Label: "ExternalEtcdClientCertificates"})
|
||||
}
|
||||
checks = append(checks, ExternalEtcdVersionCheck{Etcd: cfg.Etcd})
|
||||
}
|
||||
|
Reference in New Issue
Block a user