- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for podInOrdinalRange (0.3 sec)
-
pkg/controller/statefulset/stateful_set_utils.go
func getEndOrdinal(set *apps.StatefulSet) int { return getStartOrdinal(set) + int(*set.Spec.Replicas) - 1 } // podInOrdinalRange returns true if the pod ordinal is within the allowed // range of ordinals that this StatefulSet is set to control. func podInOrdinalRange(pod *v1.Pod, set *apps.StatefulSet) bool { ordinal := getOrdinal(pod) return ordinal >= getStartOrdinal(set) && ordinal <= getEndOrdinal(set) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 05 19:06:41 UTC 2024 - 26.7K bytes - Viewed (0) -
pkg/controller/statefulset/stateful_set_control.go
condemned := make([]*v1.Pod, 0, len(pods)) unhealthy := 0 var firstUnhealthyPod *v1.Pod // First we partition pods into two lists valid replicas and condemned Pods for _, pod := range pods { if podInOrdinalRange(pod, set) { // if the ordinal of the pod is within the range of the current number of replicas, // insert it at the indirection of its ordinal replicas[getOrdinal(pod)-getStartOrdinal(set)] = pod
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 08:03:46 UTC 2024 - 30.9K bytes - Viewed (0) -
pkg/controller/statefulset/stateful_set_control_test.go
return fmt.Errorf("claim %s has unexpected owner ref on %s for scaledown only", claim.Name, set.Name) } if !podInOrdinalRange(pod, set) && !hasOwnerRef(claim, pod) { return fmt.Errorf("claim %s does not have owner ref on condemned pod %s for scaledown delete", claim.Name, pod.Name) } if podInOrdinalRange(pod, set) && hasOwnerRef(claim, pod) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 07 19:01:47 UTC 2024 - 108.7K bytes - Viewed (0)