From 01b8e579d6e3b3e33a0322bb0236ac5d956fdb46 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 22 Oct 2022 17:58:34 +0200 Subject: [PATCH] keep PVC labels and annotations --- pkg/migrator/destination.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/migrator/destination.go b/pkg/migrator/destination.go index 84abfe4..969b2a7 100644 --- a/pkg/migrator/destination.go +++ b/pkg/migrator/destination.go @@ -35,8 +35,10 @@ func (m *Migrator) GetDestinationPVCTemplate(sourcePVC *v1.PersistentVolumeClaim } destPVC := &v1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{ - Name: m.SourcePVCName, - Namespace: m.DestNamespace, + Name: m.SourcePVCName, + Namespace: m.DestNamespace, + Labels: sourcePVC.Labels, + Annotations: sourcePVC.Annotations, }, Spec: v1.PersistentVolumeClaimSpec{ AccessModes: m.GetDestPVCAccessModes(sourcePVC.Spec.AccessModes),