Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for hasTrueCondition (0.2 sec)

  1. pkg/controller/certificates/certificate_controller_utils.go

    	approved, denied := GetCertApprovalCondition(&csr.Status)
    	return approved && !denied
    }
    
    // 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 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 02 07:05:23 UTC 2020
    - 1.7K bytes
    - Viewed (0)
  2. pkg/controller/certificates/signer/signer.go

    }
    
    func (s *signer) handle(ctx context.Context, csr *capi.CertificateSigningRequest) error {
    	// Ignore unapproved or failed requests
    	if !certificates.IsCertificateRequestApproved(csr) || certificates.HasTrueCondition(csr, capi.CertificateFailed) {
    		return nil
    	}
    
    	// Fast-path to avoid any additional processing if the CSRs signerName does not match
    	if csr.Spec.SignerName != s.signerName {
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 15 03:26:08 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  3. pkg/controller/certificates/signer/signer_test.go

    				csr := as[0].(testclient.UpdateAction).GetObject().(*capi.CertificateSigningRequest)
    				if len(csr.Status.Certificate) != 0 {
    					t.Errorf("expected no certificate to be issued")
    				}
    				if !certificates.HasTrueCondition(csr, capi.CertificateFailed) {
    					t.Errorf("expected Failed condition")
    				}
    			},
    		},
    		{
    			name:       "should sign if signerName is kubernetes.io/kube-apiserver-client-kubelet",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 02 21:12:04 UTC 2022
    - 15K bytes
    - Viewed (0)
  4. pkg/controller/job/job_controller_test.go

    					t.Errorf("Expected completion condition.  Got %#v", actual.Status.Conditions)
    				}
    			} else {
    				if cond := hasTrueCondition(actual); cond != nil {
    					t.Errorf("Got condition %s, want none", *cond)
    				}
    			}
    			if tc.expectedCondition == nil && tc.suspend && len(actual.Status.Conditions) != 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
Back to top