From 817cf2e2bf144cfd4141a871fb575788a954d226 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 24 Aug 2024 02:32:40 +0000 Subject: [PATCH] fix(deps): update patch digest dependencies --- go.mod | 6 +-- go.sum | 15 ++++--- .../backupbackingimage/backupbackingimage.go | 7 +++ .../backupstore/backupbackingimage/config.go | 4 ++ vendor/k8s.io/utils/strings/slices/slices.go | 45 +++++-------------- vendor/modules.txt | 6 +-- 6 files changed, 35 insertions(+), 48 deletions(-) diff --git a/go.mod b/go.mod index c9603015e2..107de3d9f2 100644 --- a/go.mod +++ b/go.mod @@ -59,10 +59,10 @@ require ( github.com/jinzhu/copier v0.3.5 github.com/kubernetes-csi/csi-lib-utils v0.6.1 github.com/longhorn/backing-image-manager v1.7.0-rc4 - github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f + 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/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c + github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff github.com/longhorn/longhorn-engine v1.7.0-rc4 github.com/longhorn/longhorn-instance-manager v1.7.1-0.20240822061242-db39f71745f6 github.com/longhorn/longhorn-share-manager v1.7.0-rc4 @@ -90,7 +90,7 @@ require ( k8s.io/kubernetes v1.30.3 k8s.io/metrics v0.28.5 k8s.io/mount-utils v0.31.0 - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 + k8s.io/utils v0.0.0-20240821151609-f90d01438635 sigs.k8s.io/controller-runtime v0.10.1 ) diff --git a/go.sum b/go.sum index bd0a5ce024..fac00d478c 100644 --- a/go.sum +++ b/go.sum @@ -1223,14 +1223,14 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/longhorn/backing-image-manager v1.7.0-rc4 h1:6dOm41J3Gw3CQn37tuubxIziGYXAOCkNTAYbTQUSEug= github.com/longhorn/backing-image-manager v1.7.0-rc4/go.mod h1:vCogIZw9UDhvHkkUpSA/dVn8deRBocE58wK+v7ZxYP0= -github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f h1:VBXKJ+BJoqhz+PGmHxDl6h+aWX9X9N3KQm1cxz4fv/w= -github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f/go.mod h1:U02ktOpAMSejR4vUztX2zt/78btYsUICDH5AipTddu4= +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/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c h1:ztjrkxi7KcZPZBexnSKBZ2fX75JIU+iXibXeq8qpeg4= -github.com/longhorn/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c/go.mod h1:BrtXoVnIZ97+uZ+cMcaICc5KnuJkh8j3+G1NjKxh+8Q= +github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff h1:8vR29tkbmzmdqRVtOo5kL7Rs7nfhA6duXsmetIh1Tbg= +github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff/go.mod h1:Bzz7kGNYikAJqpmeV3cgN8jP1y9M+/oaiBc5iolIxuA= github.com/longhorn/longhorn-engine v1.7.0-rc4 h1:m+IUTSwkCLXZABPzxH1NjX2P3FJv/Yg0cP5nLS2tvns= github.com/longhorn/longhorn-engine v1.7.0-rc4/go.mod h1:doPP8g43e2PusQPnVLUsW/OdCadqTAZAMIFEOWowSA4= github.com/longhorn/longhorn-instance-manager v1.7.1-0.20240822061242-db39f71745f6 h1:lLZPPrc+9PluCRDBK1JgPdqeTWR4StF+BPBBzNeKLEQ= @@ -1464,8 +1464,9 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= @@ -2494,8 +2495,8 @@ k8s.io/mount-utils v0.30.3 h1:8Z3wSW5+GSvGNtlDhtoZrBCKLMIf5z/9tf8pie+G06s= k8s.io/mount-utils v0.30.3/go.mod h1:9sCVmwGLcV1MPvbZ+rToMDnl1QcGozy+jBPd0MsQLIo= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240821151609-f90d01438635 h1:2wThSvJoW/Ncn9TmQEYXRnevZXi2duqHWf5OX9S3zjI= +k8s.io/utils v0.0.0-20240821151609-f90d01438635/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= diff --git a/vendor/github.com/longhorn/backupstore/backupbackingimage/backupbackingimage.go b/vendor/github.com/longhorn/backupstore/backupbackingimage/backupbackingimage.go index 635235ac0b..01f0f85856 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 b4c6123a20..6af28d23f5 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/k8s.io/utils/strings/slices/slices.go b/vendor/k8s.io/utils/strings/slices/slices.go index 8e21838f24..1636dfa740 100644 --- a/vendor/k8s.io/utils/strings/slices/slices.go +++ b/vendor/k8s.io/utils/strings/slices/slices.go @@ -20,21 +20,14 @@ limitations under the License. // replace "stringslices" if the "slices" package becomes standard. package slices +import goslices "slices" + // Equal reports whether two slices are equal: the same length and all // elements equal. If the lengths are different, Equal returns false. // Otherwise, the elements are compared in index order, and the // comparison stops at the first unequal pair. -func Equal(s1, s2 []string) bool { - if len(s1) != len(s2) { - return false - } - for i, n := range s1 { - if n != s2[i] { - return false - } - } - return true -} +// Deprecated: use [slices.Equal] instead. +var Equal = goslices.Equal[[]string, string] // Filter appends to d each element e of s for which keep(e) returns true. // It returns the modified d. d may be s[:0], in which case the kept @@ -51,32 +44,14 @@ func Filter(d, s []string, keep func(string) bool) []string { } // Contains reports whether v is present in s. -func Contains(s []string, v string) bool { - return Index(s, v) >= 0 -} +// Deprecated: use [slices.Contains] instead. +var Contains = goslices.Contains[[]string, string] // Index returns the index of the first occurrence of v in s, or -1 if // not present. -func Index(s []string, v string) int { - // "Contains" may be replaced with "Index(s, v) >= 0": - // https://github.com/golang/go/issues/45955#issuecomment-873377947 - for i, n := range s { - if n == v { - return i - } - } - return -1 -} - -// Functions below are not in https://github.com/golang/go/issues/45955 +// Deprecated: use [slices.Index] instead. +var Index = goslices.Index[[]string, string] // Clone returns a new clone of s. -func Clone(s []string) []string { - // https://github.com/go101/go101/wiki/There-is-not-a-perfect-way-to-clone-slices-in-Go - if s == nil { - return nil - } - c := make([]string, len(s)) - copy(c, s) - return c -} +// Deprecated: use [slices.Clone] instead. +var Clone = goslices.Clone[[]string, string] diff --git a/vendor/modules.txt b/vendor/modules.txt index e6789690db..c80add9922 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -230,7 +230,7 @@ github.com/longhorn/backing-image-manager/pkg/client github.com/longhorn/backing-image-manager/pkg/meta github.com/longhorn/backing-image-manager/pkg/types github.com/longhorn/backing-image-manager/pkg/util -# github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f +# github.com/longhorn/backupstore v0.0.0-20240823072635-7afd6aa10d3e ## explicit; go 1.22.0 github.com/longhorn/backupstore github.com/longhorn/backupstore/backupbackingimage @@ -259,7 +259,7 @@ github.com/longhorn/go-iscsi-helper/iscsidev github.com/longhorn/go-iscsi-helper/longhorndev github.com/longhorn/go-iscsi-helper/types github.com/longhorn/go-iscsi-helper/util -# github.com/longhorn/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c +# github.com/longhorn/go-spdk-helper v0.0.0-20240820144231-33c0873802ff ## explicit; go 1.22.0 github.com/longhorn/go-spdk-helper/pkg/types # github.com/longhorn/longhorn-engine v1.7.0-rc4 @@ -1525,7 +1525,7 @@ k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1 # k8s.io/mount-utils v0.31.0 => k8s.io/mount-utils v0.30.3 ## explicit; go 1.22.0 k8s.io/mount-utils -# k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 +# k8s.io/utils v0.0.0-20240821151609-f90d01438635 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock