- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ReplaceOrAppendPodCondition (0.31 sec)
-
pkg/util/pod/pod.go
} return patchBytes, bytes.Equal(patchBytes, []byte(fmt.Sprintf(`{"metadata":{"uid":%q}}`, uid))), nil } // ReplaceOrAppendPodCondition replaces the first pod condition with equal type or appends if there is none func ReplaceOrAppendPodCondition(conditions []v1.PodCondition, condition *v1.PodCondition) []v1.PodCondition { if i, _ := podutil.GetPodConditionFromList(conditions, condition.Type); i >= 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 07 15:22:29 UTC 2022 - 3K bytes - Viewed (0) -
pkg/util/pod/pod_test.go
{ Type: cType, Status: v1.ConditionFalse, }, }, }, } for _, tc := range testCases { t.Run(tc.description, func(t *testing.T) { gotConditions := ReplaceOrAppendPodCondition(tc.conditions, &tc.condition) if diff := cmp.Diff(tc.wantConditions, gotConditions); diff != "" { t.Errorf("Unexpected conditions: %s", diff) } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 07 15:22:29 UTC 2022 - 4.5K bytes - Viewed (0) -
pkg/kubelet/status/status_manager.go
if _, c := podutil.GetPodConditionFromList(newPodStatus.Conditions, c.Type); c != nil { // for shared conditions we update or append in podConditions podConditions = statusutil.ReplaceOrAppendPodCondition(podConditions, c) } } } } } newPodStatus.Conditions = podConditions // ResourceClaimStatuses is not owned and not modified by kubelet.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 02 16:27:19 UTC 2024 - 44.3K bytes - Viewed (0) -
pkg/kubelet/kubelet_pods.go
cType := v1.DisruptionTarget if _, condition := podutil.GetPodConditionFromList(oldPodStatus.Conditions, cType); condition != nil { s.Conditions = utilpod.ReplaceOrAppendPodCondition(s.Conditions, condition) } } // set all Kubelet-owned conditions if utilfeature.DefaultFeatureGate.Enabled(features.PodReadyToStartContainersCondition) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 14 16:09:17 UTC 2024 - 101.2K bytes - Viewed (0)