Skip to content

Commit 42d4c35

Browse files
committed
Use PodManagementPolicy: appsv1.ParallelPodManagement for cinder api statefulset
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.
1 parent 844d789 commit 42d4c35

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/cinderapi/statefuleset.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ func StatefulSet(
116116
Selector: &metav1.LabelSelector{
117117
MatchLabels: labels,
118118
},
119-
Replicas: instance.Spec.Replicas,
119+
PodManagementPolicy: appsv1.ParallelPodManagement,
120+
Replicas: instance.Spec.Replicas,
120121
Template: corev1.PodTemplateSpec{
121122
ObjectMeta: metav1.ObjectMeta{
122123
Annotations: annotations,

test/kuttl/common/assert_sample_deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ metadata:
3131
kind: CinderAPI
3232
name: cinder-api
3333
spec:
34-
podManagementPolicy: OrderedReady
34+
podManagementPolicy: Parallel
3535
replicas: 1
3636
revisionHistoryLimit: 10
3737
selector:

0 commit comments

Comments
 (0)