Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for getCondition (0.29 sec)

  1. pkg/controller/replication/replication_controller_utils.go

    		if c.Type == condType {
    			return &c
    		}
    	}
    	return nil
    }
    
    // SetCondition adds/replaces the given condition in the replication controller status.
    func SetCondition(status *v1.ReplicationControllerStatus, condition v1.ReplicationControllerCondition) {
    	currentCond := GetCondition(*status, condition.Type)
    	if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {
    		return
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 28 14:41:20 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. pilot/pkg/model/status/helper.go

    func GetBoolCondition(conditions []*v1alpha1.IstioCondition, condition string, defaultValue bool) bool {
    	got := GetCondition(conditions, condition)
    	if got == nil {
    		return defaultValue
    	}
    	if got.Status == StatusTrue {
    		return true
    	}
    	if got.Status == StatusFalse {
    		return false
    	}
    	return defaultValue
    }
    
    func GetCondition(conditions []*v1alpha1.IstioCondition, condition string) *v1alpha1.IstioCondition {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 21 15:06:10 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  3. pkg/controller/replicaset/replica_set_utils.go

    		Message:            msg,
    	}
    }
    
    // GetCondition returns a replicaset condition with the provided type if it exists.
    func GetCondition(status apps.ReplicaSetStatus, condType apps.ReplicaSetConditionType) *apps.ReplicaSetCondition {
    	for _, c := range status.Conditions {
    		if c.Type == condType {
    			return &c
    		}
    	}
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 12:19:51 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  4. pkg/apis/storagemigration/validation/validation.go

    func isSuccessful(svm *storagemigration.StorageVersionMigration) bool {
    	successCondition := getCondition(svm, storagemigration.MigrationSucceeded)
    	if successCondition != nil && successCondition.Status == corev1.ConditionTrue {
    		return true
    	}
    	return false
    }
    
    func isFailed(svm *storagemigration.StorageVersionMigration) bool {
    	failedCondition := getCondition(svm, storagemigration.MigrationFailed)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 04:18:56 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  5. pkg/controller/namespace/deletion/status_condition_utils.go

    	for _, conditionType := range conditionTypes {
    		newCondition := getCondition(newConditions, conditionType)
    		// if we weren't failing, then this returned nil.  We should set the "ok" variant of the condition
    		if newCondition == nil {
    			newCondition = newSuccessfulCondition(conditionType)
    		}
    		oldCondition := getCondition(status.Conditions, conditionType)
    
    		// only new condition of this type exists, add to the list
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 06 13:58:41 UTC 2019
    - 8.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfr/passes/canonicalize.cc

        // Then branch
        if (matchPattern(if_op.getCondition(), m_NonZero())) {
          return InlineRegion(if_op.getLoc(), rewriter, if_op,
                              &if_op.getThenRegion());
        }
    
        // Else branch
        if (matchPattern(if_op.getCondition(), m_Zero())) {
          if (if_op.getElseRegion().empty()) {
            // Remove the op
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  7. pilot/pkg/autoregistration/internal/health/util.go

    // condition.
    func HasHealthCondition(wle *config.Config) bool {
    	if wle == nil {
    		return false
    	}
    	s, ok := wle.Status.(*v1alpha1.IstioStatus)
    	if !ok {
    		return false
    	}
    	return status.GetCondition(s.Conditions, status.ConditionHealthy) != nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 11 07:04:17 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. pilot/pkg/model/kstatus/helper_test.go

    				},
    			},
    			condition: "",
    			want:      metav1.Condition{},
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := GetCondition(tt.conditions, tt.condition); !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("GetCondition got %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func TestCreateCondition(t *testing.T) {
    	transitionTime := metav1.Now()
    	tests := []struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 18:11:40 UTC 2023
    - 9K bytes
    - Viewed (0)
  9. pkg/controller/replication/replication_controller_utils_test.go

    		},
    		{
    			name: "condition does not exist",
    
    			status:   *exampleStatus,
    			condType: imagePullBackOff,
    
    			expected: false,
    		},
    	}
    
    	for _, test := range tests {
    		cond := GetCondition(test.status, test.condType)
    		exists := cond != nil
    		if exists != test.expected {
    			t.Errorf("%s: expected condition to exist: %t, got: %t", test.name, test.expected, exists)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 07 22:48:32 UTC 2017
    - 4.6K bytes
    - Viewed (0)
  10. security/pkg/k8s/chiron/utils_test.go

    				}
    			}
    		}
    	}()
    	return client
    }
    
    func approved(csr *cert.CertificateSigningRequest) bool {
    	return GetCondition(csr.Status.Conditions, cert.CertificateApproved).Status == corev1.ConditionTrue
    }
    
    func GetCondition(conditions []cert.CertificateSigningRequestCondition, condition cert.RequestConditionType) cert.CertificateSigningRequestCondition {
    	for _, cond := range conditions {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 03:58:11 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top