mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-28 19:53:00 +00:00
Switch issued check to inspect certificate length
Kubernetes-commit: 94fd1d76ca0e8992b000fbb6b1562c11c37df7cb
This commit is contained in:
parent
e72c3d3ce2
commit
198e8f5ee4
@ -374,6 +374,9 @@ func getCurrentCertificateOrBootstrap(
|
||||
if err != nil {
|
||||
return nil, false, fmt.Errorf("unable to parse certificate data: %v", err)
|
||||
}
|
||||
if len(certs) < 1 {
|
||||
return nil, false, fmt.Errorf("no cert data found")
|
||||
}
|
||||
bootstrapCert.Leaf = certs[0]
|
||||
|
||||
if _, err := store.Update(bootstrapCertificatePEM, bootstrapKeyPEM); err != nil {
|
||||
|
@ -125,7 +125,7 @@ func WaitForCertificate(ctx context.Context, client certificatesclient.Certifica
|
||||
}
|
||||
}
|
||||
if approved {
|
||||
if csr.Status.Certificate != nil {
|
||||
if len(csr.Status.Certificate) > 0 {
|
||||
klog.V(2).Infof("certificate signing request %s is issued", csr.Name)
|
||||
return true, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user