Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pb 4872:Added code to pass the storageclass value as label in the dataexport CR. #1572

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions drivers/volume/kdmp/kdmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ const (
restoreObjectNameKey = utils.KdmpAnnotationPrefix + "restoreobject-name"
restoreObjectUIDKey = utils.KdmpAnnotationPrefix + "restoreobject-uid"

pvcNameKey = utils.KdmpAnnotationPrefix + "pvc-name"
pvcUIDKey = utils.KdmpAnnotationPrefix + "pvc-uid"
pvcNameKey = utils.KdmpAnnotationPrefix + "pvc-name"
pvcUIDKey = utils.KdmpAnnotationPrefix + "pvc-uid"
kdmpStorageClassKey = utils.KdmpAnnotationPrefix + "storage-class"
// pvcProvisionerAnnotation is the annotation on PVC which has the
// provisioner name
pvcProvisionerAnnotation = "volume.beta.kubernetes.io/storage-provisioner"
Expand Down Expand Up @@ -266,6 +267,7 @@ func (k *kdmp) StartBackup(backup *storkapi.ApplicationBackup,
labels[utils.ApplicationBackupCRUIDKey] = utils.GetValidLabel(utils.GetShortUID(string(backup.UID)))
labels[pvcNameKey] = utils.GetValidLabel(pvc.Name)
labels[pvcUIDKey] = utils.GetValidLabel(utils.GetShortUID(string(pvc.UID)))
labels[kdmpStorageClassKey] = volumeInfo.StorageClass
// If backup from px-backup, update the backup object details in the label
if val, ok := backup.Annotations[utils.PxbackupAnnotationCreateByKey]; ok {
if val == utils.PxbackupAnnotationCreateByValue {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ require (
)

require (
github.com/portworx/kdmp v0.4.1-0.20230927104323-84564ac8b457
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24
k8s.io/utils v0.0.0-20230505201702-9f6742963106
kubevirt.io/api v1.0.0
)
Expand Down Expand Up @@ -121,7 +122,6 @@ require (
github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b // indirect
github.com/educlos/testrail v0.0.0-20210915115134-adb5e6f62a6d // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/color v1.13.0 // indirect
Expand Down Expand Up @@ -333,7 +333,7 @@ replace (
github.com/libopenstorage/autopilot-api => github.com/libopenstorage/autopilot-api v0.6.1-0.20210301232050-ca2633c6e114
github.com/libopenstorage/openstorage => github.com/libopenstorage/openstorage v0.0.0-20230511212757-41751b27d69f
github.com/libopenstorage/secrets => github.com/libopenstorage/secrets v0.0.0-20220413195519-57d1c446c5e9
github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20231025110112-14cdb50c205e
github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24
github.com/portworx/sched-ops => github.com/portworx/sched-ops v1.20.4-rc1.0.20230930052008-186afa1e82c4
github.com/portworx/torpedo => github.com/portworx/torpedo v0.0.0-20231013194137-84e2957806f0
gopkg.in/fsnotify.v1 v1.4.7 => github.com/fsnotify/fsnotify v1.4.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2894,8 +2894,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/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.20231025110112-14cdb50c205e h1:qmG0TUupl1PWqLTlMg58wsMQYvcNgU+GPwV2UFny62k=
github.com/portworx/kdmp v0.4.1-0.20231025110112-14cdb50c205e/go.mod h1:mcZrNtJqqVH9iywX905p5EoycJLb/dB77HFtKjn/VLE=
github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24 h1:phnNwa/LAR8Bed5T9Ji9m8l9mHdO500kpd4obfG4YgE=
github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24/go.mod h1:mMZUDNoAfslBw6DxEXKN2KSEt14l/HIGtt1CzgOghp0=
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/go.mod h1:Q8YyrNDvPp3DVF96BDcQuaC7fAYUCuUX+l58S7OnD2M=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/portworx/kdmp/pkg/drivers/options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/portworx/kdmp/pkg/executor/common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,8 @@ github.com/pkg/errors
# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
## explicit
github.com/pmezard/go-difflib/difflib
# github.com/portworx/kdmp v0.4.1-0.20230927104323-84564ac8b457 => github.com/portworx/kdmp v0.4.1-0.20231025110112-14cdb50c205e
## explicit; go 1.20
# github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24 => github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24
## explicit; go 1.21
github.com/portworx/kdmp/pkg/apis/kdmp
github.com/portworx/kdmp/pkg/apis/kdmp/v1alpha1
github.com/portworx/kdmp/pkg/client/clientset/versioned
Expand Down Expand Up @@ -2479,7 +2479,7 @@ sigs.k8s.io/yaml
# github.com/libopenstorage/autopilot-api => github.com/libopenstorage/autopilot-api v0.6.1-0.20210301232050-ca2633c6e114
# github.com/libopenstorage/openstorage => github.com/libopenstorage/openstorage v0.0.0-20230511212757-41751b27d69f
# github.com/libopenstorage/secrets => github.com/libopenstorage/secrets v0.0.0-20220413195519-57d1c446c5e9
# github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20231025110112-14cdb50c205e
# github.com/portworx/kdmp => github.com/portworx/kdmp v0.4.1-0.20231123040148-68149a57dc24
# github.com/portworx/sched-ops => github.com/portworx/sched-ops v1.20.4-rc1.0.20230930052008-186afa1e82c4
# github.com/portworx/torpedo => github.com/portworx/torpedo v0.0.0-20231013194137-84e2957806f0
# gopkg.in/fsnotify.v1 v1.4.7 => github.com/fsnotify/fsnotify v1.4.7
Expand Down