Skip to content

Commit

Permalink
Use PodManagementPolicy: appsv1.ParallelPodManagement for the manilaa…
Browse files Browse the repository at this point in the history
…pi statefulsets

With the default `PodManagementPolicy: OrderedReadyPodManagement` the
statefulset controller will only progress pods when the
previous/current pod is ready or terminated.

When service configuration changes while the pod is starting and the
new configuration requires e.g. additional volume mounts the initial
pod will never reach ready and therefore an update won't happen.

With ParallelPodManagement the statefulset controller will not wait
for pods to be ready or complete termination.
  • Loading branch information
stuggi committed Apr 18, 2024
1 parent 969367d commit d72a406
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/manilaapi/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func StatefulSet(
Selector: &metav1.LabelSelector{
MatchLabels: labels,
},
Replicas: instance.Spec.Replicas,
PodManagementPolicy: appsv1.ParallelPodManagement,
Replicas: instance.Spec.Replicas,
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Annotations: annotations,
Expand Down

0 comments on commit d72a406

Please sign in to comment.