diff --git a/go.mod b/go.mod index 25f6c080f..a6846068c 100644 --- a/go.mod +++ b/go.mod @@ -10,12 +10,12 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/handlers v1.5.2 github.com/gorilla/mux v1.8.1 - github.com/longhorn/backupstore v0.0.0-20240823013231-436ca3afcf2d - github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e + github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e + github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff github.com/longhorn/types v0.0.0-20240725040629-473d671316c4 - github.com/moby/moby v23.0.13+incompatible + github.com/moby/moby v23.0.14+incompatible github.com/pkg/errors v0.9.1 github.com/rancher/go-fibmap v0.0.0-20160418233256-5fc9f8c1ed47 github.com/rancher/go-rancher v0.1.1-0.20190307222549-9756097e5e4c diff --git a/go.sum b/go.sum index 9cee8d2b0..55db363a0 100644 --- a/go.sum +++ b/go.sum @@ -78,10 +78,10 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/longhorn/backupstore v0.0.0-20240823013231-436ca3afcf2d h1:Rgkx0ECHGN4/7FiJFLbsxnkMZa61xwYlLJn9b21/KYI= -github.com/longhorn/backupstore v0.0.0-20240823013231-436ca3afcf2d/go.mod h1:paCodgnnJOHSOP9tLi3+C/cqtY7E9Mz9xY/YDF+75IA= -github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e h1:cmns0zh6HMocqH7tnjFrgI8mf/h1i0bbnLznWfjQ63k= -github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e/go.mod h1:Yrq49KPpchy++7Z15GrMKPkiwr5IduPboLTL99a1TGA= +github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e h1:Kvt/BqiHKaOlTPSM2HFz0VupuQM0laln67rMIDCRYxQ= +github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e/go.mod h1:N4cqNhSs4VUw9aGbO2OfyiIvJL7/L53hUrNiT73UN+U= +github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f h1:hjqUs3WVodkzrWwlUMVsnKAlom3uohoNlhZBGLsRvQY= +github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f/go.mod h1:Qv34svr/msf6XoUwnrltNBTwMhQljbHEhb5ZKWiRdxo= github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 h1:fzLAnCLCecoUnsSYyyo7li5GD17xckyBl/zietxz168= github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58/go.mod h1:TobRDCXmF0Ni+jz6+nLJamw3uVu+gNDZoZre1JczGwc= github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff h1:gmdQDbnaGJ/zmrK+QJzSys8mH679os6i7vW/pOpRn1U= @@ -97,8 +97,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/moby/moby v23.0.13+incompatible h1:rz1yIVJto4y12T6TOBtqfsFUfwNOAMys5lbxyYDAmPs= -github.com/moby/moby v23.0.13+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= +github.com/moby/moby v23.0.14+incompatible h1:NyaIFpK1dE6QfuUTtaldEFtq7/S/kV5LdtDqGAmW9t0= +github.com/moby/moby v23.0.14+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= diff --git a/vendor/github.com/longhorn/backupstore/backupbackingimage/backupbackingimage.go b/vendor/github.com/longhorn/backupstore/backupbackingimage/backupbackingimage.go index 635235ac0..01f0f8585 100644 --- a/vendor/github.com/longhorn/backupstore/backupbackingimage/backupbackingimage.go +++ b/vendor/github.com/longhorn/backupstore/backupbackingimage/backupbackingimage.go @@ -10,6 +10,8 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" + lhbackup "github.com/longhorn/go-common-libs/backup" + "github.com/longhorn/backupstore" "github.com/longhorn/backupstore/common" "github.com/longhorn/backupstore/types" @@ -31,6 +33,8 @@ type BackupBackingImage struct { CompressionMethod string CreatedTime string CompleteTime string + Secret string + SecretNamespace string ProcessingBlocks *common.ProcessingBlocks @@ -41,6 +45,7 @@ type BackupConfig struct { Name string DestURL string ConcurrentLimit int32 + Parameters map[string]string } type RestoreConfig struct { @@ -180,6 +185,8 @@ func performBackup(bsDriver backupstore.BackupStoreDriver, config *BackupConfig, backupBackingImage.Blocks = common.SortBackupBlocks(backupBackingImage.Blocks, backupBackingImage.Size, mappings.BlockSize) backupBackingImage.CompleteTime = util.Now() backupBackingImage.BlockCount = totalBlockCounts + backupBackingImage.Secret = config.Parameters[lhbackup.LonghornBackupBackingImageParameterSecret] + backupBackingImage.SecretNamespace = config.Parameters[lhbackup.LonghornBackupBackingImageParameterSecretNamespace] if err := saveBackingImageConfig(bsDriver, backupBackingImage); err != nil { return progress.Progress, "", err } diff --git a/vendor/github.com/longhorn/backupstore/backupbackingimage/config.go b/vendor/github.com/longhorn/backupstore/backupbackingimage/config.go index b4c6123a2..6af28d23f 100644 --- a/vendor/github.com/longhorn/backupstore/backupbackingimage/config.go +++ b/vendor/github.com/longhorn/backupstore/backupbackingimage/config.go @@ -184,6 +184,8 @@ type BackupInfo struct { Checksum string Labels map[string]string CompressionMethod string `json:",omitempty"` + Secret string + SecretNamespace string } func InspectBackupBackingImage(backupURL string) (*BackupInfo, error) { @@ -217,5 +219,7 @@ func fillFullBackupBackingImageInfo(backupBackingImage *BackupBackingImage, dest Checksum: backupBackingImage.Checksum, Labels: backupBackingImage.Labels, CompressionMethod: backupBackingImage.CompressionMethod, + Secret: backupBackingImage.Secret, + SecretNamespace: backupBackingImage.SecretNamespace, } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 8ed771ee4..724436ef9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -161,7 +161,7 @@ github.com/kr/pretty # github.com/kr/text v0.2.0 ## explicit github.com/kr/text -# github.com/longhorn/backupstore v0.0.0-20240823013231-436ca3afcf2d +# github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e ## explicit; go 1.22.0 github.com/longhorn/backupstore github.com/longhorn/backupstore/azblob @@ -178,7 +178,7 @@ github.com/longhorn/backupstore/systembackup github.com/longhorn/backupstore/types github.com/longhorn/backupstore/util github.com/longhorn/backupstore/vfs -# github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e +# github.com/longhorn/go-common-libs v0.0.0-20240821134112-907f57efd48f ## explicit; go 1.22.0 github.com/longhorn/go-common-libs/backup github.com/longhorn/go-common-libs/exec @@ -220,7 +220,7 @@ github.com/matttproud/golang_protobuf_extensions/pbutil # github.com/mitchellh/go-ps v1.0.0 ## explicit; go 1.13 github.com/mitchellh/go-ps -# github.com/moby/moby v23.0.13+incompatible +# github.com/moby/moby v23.0.14+incompatible ## explicit github.com/moby/moby/pkg/reexec # github.com/moby/sys/mountinfo v0.7.1