Unverified Commit 6617394f authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #70056 from bart0sh/PR0035-kubeadm-certsapi-handling-err

kubeadm: fix missing error handling
parents 322d0df3 daa11115
...@@ -119,6 +119,9 @@ func (r *CertsAPIRenewal) Renew(cfg *certutil.Config) (*x509.Certificate, *rsa.P ...@@ -119,6 +119,9 @@ func (r *CertsAPIRenewal) Renew(cfg *certutil.Config) (*x509.Certificate, *rsa.P
} }
req, err = r.client.CertificateSigningRequests().Get(req.Name, metav1.GetOptions{}) req, err = r.client.CertificateSigningRequests().Get(req.Name, metav1.GetOptions{})
if err != nil {
return nil, nil, errors.Wrap(err, "couldn't get certificate signing request")
}
if len(req.Status.Conditions) < 1 { if len(req.Status.Conditions) < 1 {
return nil, nil, errors.New("certificate signing request has no statuses") return nil, nil, errors.New("certificate signing request has no statuses")
} }
......
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