mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 01:50:55 +00:00
@@ -28,7 +28,7 @@ func IsCertificateRequestApproved(csr *certificates.CertificateSigningRequest) b
|
||||
return approved && !denied
|
||||
}
|
||||
|
||||
// HasCondition returns true if the csr contains a condition of the specified type with a status that is set to True or is empty
|
||||
// HasTrueCondition returns true if the csr contains a condition of the specified type with a status that is set to True or is empty
|
||||
func HasTrueCondition(csr *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) bool {
|
||||
for _, c := range csr.Status.Conditions {
|
||||
if c.Type == conditionType && (len(c.Status) == 0 || c.Status == v1.ConditionTrue) {
|
||||
|
Reference in New Issue
Block a user