From 28ea2f6b802eea44764e6e6822b4ad5ef4864430 Mon Sep 17 00:00:00 2001 From: jiuker Date: Fri, 9 Dec 2022 22:46:01 +0800 Subject: [PATCH] only the spec can be equal Signed-off-by: jiuker --- k8sutils/statefulset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8sutils/statefulset.go b/k8sutils/statefulset.go index beea3b12e..7635ace88 100644 --- a/k8sutils/statefulset.go +++ b/k8sutils/statefulset.go @@ -162,8 +162,8 @@ func patchStatefulSet(storedStateful *appsv1.StatefulSet, newStateful *appsv1.St } } } - // set stored.volumeClaimTemplates newStateful.Annotations["storageCapacity"] = storedStateful.Annotations["storageCapacity"] + // set stored.volumeClaimTemplates newStateful.Spec.VolumeClaimTemplates = storedStateful.Spec.VolumeClaimTemplates }