mirror of https://github.com/k3s-io/k3s
Merge pull request #70056 from bart0sh/PR0035-kubeadm-certsapi-handling-err
kubeadm: fix missing error handlingpull/58/head
commit
6617394faf
|
@ -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{})
|
||||
if err != nil {
|
||||
return nil, nil, errors.Wrap(err, "couldn't get certificate signing request")
|
||||
}
|
||||
if len(req.Status.Conditions) < 1 {
|
||||
return nil, nil, errors.New("certificate signing request has no statuses")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue