From ae8feb09b9b0162a0587aecfc90a8b89674d7d16 Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Fri, 1 Jul 2022 08:29:42 -0400 Subject: [PATCH] fix(provider): apply missing volume templates on deployment update if deployment with persistent storage is being updated it should reuse existing persistent volume templates ref #286 Signed-off-by: Artur Troian --- provider/cluster/kube/builder/statefulset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider/cluster/kube/builder/statefulset.go b/provider/cluster/kube/builder/statefulset.go index 0817353901..3587d99db7 100644 --- a/provider/cluster/kube/builder/statefulset.go +++ b/provider/cluster/kube/builder/statefulset.go @@ -76,7 +76,7 @@ func (b *statefulSet) Update(obj *appsv1.StatefulSet) (*appsv1.StatefulSet, erro obj.Spec.Template.Labels = b.labels() obj.Spec.Template.Spec.Containers = []corev1.Container{b.container()} obj.Spec.Template.Spec.ImagePullSecrets = b.imagePullSecrets() - obj.Spec.VolumeClaimTemplates = []corev1.PersistentVolumeClaim{} + obj.Spec.VolumeClaimTemplates = b.persistentVolumeClaims() return obj, nil }