diff --git a/pkg/swiftstorage/statefulset.go b/pkg/swiftstorage/statefulset.go index 13c5d2e8..5178d60a 100644 --- a/pkg/swiftstorage/statefulset.go +++ b/pkg/swiftstorage/statefulset.go @@ -205,7 +205,8 @@ func StatefulSet( Selector: &metav1.LabelSelector{ MatchLabels: labels, }, - Replicas: swiftstorage.Spec.Replicas, + Replicas: swiftstorage.Spec.Replicas, + PodManagementPolicy: appsv1.ParallelPodManagement, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, diff --git a/tests/kuttl/tests/basic-deploy/02-assert-scaleup-swift.yaml b/tests/kuttl/tests/basic-deploy/02-assert-scaleup-swift.yaml new file mode 100644 index 00000000..314bdcb0 --- /dev/null +++ b/tests/kuttl/tests/basic-deploy/02-assert-scaleup-swift.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: swift-storage-0 +status: + phase: Running +--- +apiVersion: v1 +kind: Pod +metadata: + name: swift-storage-1 +status: + phase: Running +--- +apiVersion: v1 +kind: Pod +metadata: + name: swift-storage-2 +status: + phase: Running diff --git a/tests/kuttl/tests/basic-deploy/02-scaleup-swift.yaml b/tests/kuttl/tests/basic-deploy/02-scaleup-swift.yaml new file mode 100644 index 00000000..b8476fda --- /dev/null +++ b/tests/kuttl/tests/basic-deploy/02-scaleup-swift.yaml @@ -0,0 +1,5 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + oc patch -n swift-kuttl-tests swift/swift --type='json' -p='[{"op": "replace", "path": "/spec/swiftStorage/replicas", "value":3}]' diff --git a/tests/kuttl/tests/basic-deploy/02-cleanup.yaml b/tests/kuttl/tests/basic-deploy/03-cleanup.yaml similarity index 59% rename from tests/kuttl/tests/basic-deploy/02-cleanup.yaml rename to tests/kuttl/tests/basic-deploy/03-cleanup.yaml index 67ffe930..eb0b694c 100644 --- a/tests/kuttl/tests/basic-deploy/02-cleanup.yaml +++ b/tests/kuttl/tests/basic-deploy/03-cleanup.yaml @@ -7,3 +7,5 @@ delete: commands: - script: | oc delete --ignore-not-found=true -n $NAMESPACE pvc srv-swift-storage-0 + oc delete --ignore-not-found=true -n $NAMESPACE pvc srv-swift-storage-1 + oc delete --ignore-not-found=true -n $NAMESPACE pvc srv-swift-storage-2 diff --git a/tests/kuttl/tests/basic-deploy/02-errors-cleanup.yaml b/tests/kuttl/tests/basic-deploy/03-errors-cleanup.yaml similarity index 100% rename from tests/kuttl/tests/basic-deploy/02-errors-cleanup.yaml rename to tests/kuttl/tests/basic-deploy/03-errors-cleanup.yaml