- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for setCondition (0.31 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
pilot/pkg/autoregistration/internal/state/store.go
if !s.cb.IsControllerOf(cfg) { return nil } // check if the existing health status is newer than this one wleStatus, ok := cfg.Status.(*v1alpha1.IstioStatus) if ok { healthCondition := status.GetCondition(wleStatus.Conditions, status.ConditionHealthy) if healthCondition != nil { if healthCondition.LastProbeTime.AsTime().After(condition.LastProbeTime.AsTime()) { return nil } } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 3.3K bytes - Viewed (0)