diff --git a/go.mod b/go.mod index 875c51e0a3..d61b0df428 100644 --- a/go.mod +++ b/go.mod @@ -301,7 +301,7 @@ replace ( github.com/kubernetes-incubator/external-storage v0.20.4-openstorage-rc10 => github.com/kubernetes-incubator/external-storage v0.25.1-openstorage-rc1 github.com/libopenstorage/autopilot-api => github.com/libopenstorage/autopilot-api v0.6.1-0.20210301232050-ca2633c6e114 github.com/libopenstorage/openstorage => github.com/libopenstorage/openstorage v1.0.1-0.20221216200022-d1c57a8ea854 - github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20230207113334-0b97b6052012 + github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20230208042815-0ff7fd273d32 github.com/portworx/sched-ops => github.com/portworx/sched-ops v1.20.4-rc1.0.20230207070155-2e0ef25efadd github.com/portworx/torpedo => github.com/portworx/torpedo v0.0.0-20230206162106-035fee117ba3 gopkg.in/fsnotify.v1 v1.4.7 => github.com/fsnotify/fsnotify v1.4.7 diff --git a/go.sum b/go.sum index aa086b2d2f..43f4d9e774 100644 --- a/go.sum +++ b/go.sum @@ -2242,8 +2242,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v1.0.5/go.mod h1:APVvOesVSAnne5SClsPxPdfvZTVDojXh1/G3qb5wjGI= github.com/portworx/dcos-secrets v0.0.0-20180616013705-8e8ec3f66611/go.mod h1:4hklRW/4DQpLqkcXcjtNprbH2tz/sJaNtqinfPWl/LA= -github.com/portworx/kdmp v0.4.1-0.20230207113334-0b97b6052012 h1:qc9BaQOoKO7k949lrDdp/pj6GmuqC84cyOHxiL/ZdsQ= -github.com/portworx/kdmp v0.4.1-0.20230207113334-0b97b6052012/go.mod h1:qYk1yJnEO4xu19EHQ/HwLrXE2XNNkLi9yBcilPKMZPY= +github.com/portworx/kdmp v0.4.1-0.20230208042815-0ff7fd273d32 h1:+4BzxQXyvP2jm6cccw0u0kNggxBYXtddAlo6/Y/m30Y= +github.com/portworx/kdmp v0.4.1-0.20230208042815-0ff7fd273d32/go.mod h1:qYk1yJnEO4xu19EHQ/HwLrXE2XNNkLi9yBcilPKMZPY= github.com/portworx/kvdb v0.0.0-20190105022415-cccaa09abfc9/go.mod h1:Q8YyrNDvPp3DVF96BDcQuaC7fAYUCuUX+l58S7OnD2M= github.com/portworx/kvdb v0.0.0-20200723230726-2734b7f40194/go.mod h1:Q8YyrNDvPp3DVF96BDcQuaC7fAYUCuUX+l58S7OnD2M= github.com/portworx/kvdb v0.0.0-20200929023115-b312c7519467 h1:jkqzdbOnejgSN5HG/FLt4enNrozWT/K+nlmaRm3P1II= diff --git a/vendor/github.com/portworx/kdmp/pkg/drivers/kopiabackup/kopiabackuplive.go b/vendor/github.com/portworx/kdmp/pkg/drivers/kopiabackup/kopiabackuplive.go index 48f40d57de..c69eaf0044 100644 --- a/vendor/github.com/portworx/kdmp/pkg/drivers/kopiabackup/kopiabackuplive.go +++ b/vendor/github.com/portworx/kdmp/pkg/drivers/kopiabackup/kopiabackuplive.go @@ -11,6 +11,7 @@ import ( batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8shelper "k8s.io/component-helpers/storage/volume" ) var ( @@ -222,5 +223,17 @@ func getVolumeDirectory(pvcName, pvcNamespace string) (string, error) { return pvc.Spec.VolumeName + "/mount", nil } + // Check if the pv spec contains pv.kubernetes.io/migrated-to annotation, + // Then add the mount to the volume dir as it was provisioned by the CSI provisioner. + // From 1.23 k8s version onwards the in-tree storage provisioner driver are not supported. + // So all of them will migrated to use CSI provisioner. These driver will have above annotation and + // will not have the CSI section in the pv spec. + if pv.Annotations != nil { + annotations := pv.GetAnnotations() + if _, ok := annotations[k8shelper.AnnMigratedTo]; ok { + return pvc.Spec.VolumeName + "/mount", nil + } + } + return pvc.Spec.VolumeName, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 2e2fe0bab2..763fbfc4a7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -896,7 +896,7 @@ github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/portworx/kdmp v0.4.1-0.20230127055521-e23d6b003478 => github.com/portworx/kdmp v0.4.1-0.20230207113334-0b97b6052012 +# github.com/portworx/kdmp v0.4.1-0.20230127055521-e23d6b003478 => github.com/portworx/kdmp v0.4.1-0.20230208042815-0ff7fd273d32 ## explicit; go 1.19 github.com/portworx/kdmp/pkg/apis/kdmp github.com/portworx/kdmp/pkg/apis/kdmp/v1alpha1 @@ -2239,7 +2239,7 @@ sigs.k8s.io/yaml # github.com/kubernetes-incubator/external-storage v0.20.4-openstorage-rc10 => github.com/kubernetes-incubator/external-storage v0.25.1-openstorage-rc1 # github.com/libopenstorage/autopilot-api => github.com/libopenstorage/autopilot-api v0.6.1-0.20210301232050-ca2633c6e114 # github.com/libopenstorage/openstorage => github.com/libopenstorage/openstorage v1.0.1-0.20221216200022-d1c57a8ea854 -# github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20230207113334-0b97b6052012 +# github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20230208042815-0ff7fd273d32 # github.com/portworx/sched-ops => github.com/portworx/sched-ops v1.20.4-rc1.0.20230207070155-2e0ef25efadd # github.com/portworx/torpedo => github.com/portworx/torpedo v0.0.0-20230206162106-035fee117ba3 # gopkg.in/fsnotify.v1 v1.4.7 => github.com/fsnotify/fsnotify v1.4.7