Unverified Commit 9746a40e authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #76636 from mdaniel/kubeadm-issue-1507

Output missing cert or key name in DownloadCerts
parents 92e087c4 b0814869
...@@ -231,7 +231,7 @@ func DownloadCerts(client clientset.Interface, cfg *kubeadmapi.InitConfiguration ...@@ -231,7 +231,7 @@ func DownloadCerts(client clientset.Interface, cfg *kubeadmapi.InitConfiguration
for certOrKeyName, certOrKeyPath := range certsToTransfer(cfg) { for certOrKeyName, certOrKeyPath := range certsToTransfer(cfg) {
certOrKeyData, found := secretData[certOrKeyNameToSecretName(certOrKeyName)] certOrKeyData, found := secretData[certOrKeyNameToSecretName(certOrKeyName)]
if !found { if !found {
return errors.New("couldn't find required certificate or key in Secret") return errors.Errorf("the Secret does not include the required certificate or key - name: %s, path: %s", certOrKeyName, certOrKeyPath)
} }
if len(certOrKeyData) == 0 { if len(certOrKeyData) == 0 {
klog.V(1).Infof("[download-certs] Not saving %q to disk, since it is empty in the %q Secret\n", certOrKeyName, kubeadmconstants.KubeadmCertsSecret) klog.V(1).Infof("[download-certs] Not saving %q to disk, since it is empty in the %q Secret\n", certOrKeyName, kubeadmconstants.KubeadmCertsSecret)
......
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