Support burst in stateful set scale up and down
The alpha field podManagementPolicy defines how pods are created, deleted, and replaced. The new `Parallel` policy will replace pods as fast as possible, not waiting for the pod to be `Ready` or providing an order. This allows for advanced clustered software to take advantage of rapid changes in scale.
This commit is contained in:
@@ -227,6 +227,11 @@ func isHealthy(pod *v1.Pod) bool {
|
||||
return isRunningAndReady(pod) && !isTerminating(pod)
|
||||
}
|
||||
|
||||
// allowsBurst is true if the alpha burst annotation is set.
|
||||
func allowsBurst(set *apps.StatefulSet) bool {
|
||||
return set.Annotations[apps.StatefulSetBurstAnnotation] == "true"
|
||||
}
|
||||
|
||||
// newControllerRef returns an ControllerRef pointing to a given StatefulSet.
|
||||
func newControllerRef(set *apps.StatefulSet) *metav1.OwnerReference {
|
||||
blockOwnerDeletion := true
|
||||
|
Reference in New Issue
Block a user