Unverified Commit dd139699 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #64269 from kad/kubeadm-834

Automatic merge from submit-queue (batch tested with PRs 64318, 64269, 64438, 64516, 64311). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. UX improvement for preflight check for external etcd client certificates **What this PR does / why we need it**: 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: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes kubernetes/kubeadm#834 **Special notes for your reviewer**: **Release note**: ```release-note Label ExternalEtcdClientCertificates can be used for ignoring all preflight check issues related to client certificate files for external etcd. ```
parents 5aa51342 c798dfc8
...@@ -923,13 +923,13 @@ func RunInitMasterChecks(execer utilsexec.Interface, cfg *kubeadmapi.MasterConfi ...@@ -923,13 +923,13 @@ func RunInitMasterChecks(execer utilsexec.Interface, cfg *kubeadmapi.MasterConfi
if cfg.Etcd.External != nil { if cfg.Etcd.External != nil {
// Only check etcd version when external endpoints are specified // Only check etcd version when external endpoints are specified
if cfg.Etcd.External.CAFile != "" { 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 != "" { 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 != "" { 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}) checks = append(checks, ExternalEtcdVersionCheck{Etcd: cfg.Etcd})
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment