Commit daa11115 authored by Ed Bartosh's avatar Ed Bartosh

kubeadm: fix missing error handling

Handled error returned from CertificateSigningRequests().Get()
parent 2dc9acc2
...@@ -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