Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for setCondition (0.35 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. 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)
  3. pkg/controller/podautoscaler/horizontal.go

    	if invalidMetricsCount >= len(metricSpecs) || (invalidMetricsCount > 0 && replicas < specReplicas) {
    		setCondition(hpa, invalidMetricCondition.Type, invalidMetricCondition.Status, invalidMetricCondition.Reason, invalidMetricCondition.Message)
    		return -1, "", statuses, time.Time{}, invalidMetricError
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 63.6K bytes
    - Viewed (0)
  4. pkg/controller/replication/replication_controller_utils_test.go

    			cond:   condReplicaFailure2(),
    
    			expectedStatus: &v1.ReplicationControllerStatus{Conditions: []v1.ReplicationControllerCondition{condReplicaFailure2()}},
    		},
    	}
    
    	for _, test := range tests {
    		SetCondition(test.status, test.cond)
    		if !reflect.DeepEqual(test.status, test.expectedStatus) {
    			t.Errorf("%s: expected status: %v, got: %v", test.name, test.expectedStatus, test.status)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 07 22:48:32 UTC 2017
    - 4.6K bytes
    - Viewed (0)
  5. pkg/controller/daemon/update_test.go

    		}
    		if !podutil.UpdatePodCondition(&pod.Status, &condition) {
    			t.Fatal("failed to update pod")
    		}
    		// TODO: workaround UpdatePodCondition calling time.Now() directly
    		setCondition := podutil.GetPodReadyCondition(pod.Status)
    		setCondition.LastTransitionTime.Time = dsc.failedPodsBackoff.Clock.Now()
    		logger.Info("marked pod ready", "pod", pod.Name, "ready", ready)
    		count--
    	}
    	if count > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 10 21:10:35 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  6. pkg/controller/replicaset/replica_set_test.go

    			cond:   condReplicaFailure2(),
    
    			expectedStatus: &apps.ReplicaSetStatus{Conditions: []apps.ReplicaSetCondition{condReplicaFailure2()}},
    		},
    	}
    
    	for _, test := range tests {
    		SetCondition(test.status, test.cond)
    		if !reflect.DeepEqual(test.status, test.expectedStatus) {
    			t.Errorf("%s: expected status: %v, got: %v", test.name, test.expectedStatus, test.status)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 69.2K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top