From 94c472f30bcaadcff1d4dcfbf000142d5296b5b3 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Mon, 11 Apr 2022 01:48:04 -0700 Subject: [PATCH] [cherry-pick] Use restic 0.13.1 (#1151) (#1156) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- Makefile | 2 +- go.mod | 3 ++- go.sum | 6 ++++-- vendor/kmodules.xyz/client-go/api/v1/timeofday.go | 12 ++++++++++-- vendor/kmodules.xyz/client-go/meta/incluster.go | 2 +- vendor/modules.txt | 5 +++-- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 56e0d6d57..b12c7ec07 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ else endif endif -RESTIC_VER := 0.13.0 +RESTIC_VER := 0.13.1 ### ### These variables should not need tweaking. diff --git a/go.mod b/go.mod index d326be18e..087ca3d93 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,13 @@ require ( gomodules.xyz/flags v0.1.3 gomodules.xyz/go-sh v0.1.0 gomodules.xyz/logs v0.0.6 + gomodules.xyz/mergo v0.3.13-0.20220214162359-48efe39fd402 // indirect gomodules.xyz/x v0.0.13 k8s.io/api v0.21.1 k8s.io/apimachinery v0.21.1 k8s.io/client-go v0.21.1 k8s.io/klog/v2 v2.9.0 - kmodules.xyz/client-go v0.0.0-20220317213815-2a6d5a5784f2 + kmodules.xyz/client-go v0.0.0-20220404224906-af7b092cfac5 kmodules.xyz/custom-resources v0.0.0-20220317220154-7beb809b1f5e kmodules.xyz/offshoot-api v0.0.0-20220329041708-c076b2bcb0f8 stash.appscode.dev/apimachinery v0.19.0 diff --git a/go.sum b/go.sum index ca8d61c51..a2fe79a49 100644 --- a/go.sum +++ b/go.sum @@ -961,8 +961,9 @@ gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gomodules.xyz/logs v0.0.6 h1:8+9Wkud5yBPtIvkVszubyTeFxNII30lWODom0+GZD8U= gomodules.xyz/logs v0.0.6/go.mod h1:Q+fFtZFLEB5q86KmDehXCGuMP72Rv+Rwz0KuVxK+Gi4= -gomodules.xyz/mergo v0.3.13-0.20210702100041-9d62ff8ece4d h1:i6r7bk2jF965W3xmORgz+KYhlH608oRvrAPpcNHorlo= gomodules.xyz/mergo v0.3.13-0.20210702100041-9d62ff8ece4d/go.mod h1:i2WNHvGpzLKI+/qWRhscddeashtzrtxCAucS2H7hrtM= +gomodules.xyz/mergo v0.3.13-0.20220214162359-48efe39fd402 h1:l67pCtMNx51TcCkBhGV1qSVnMrJ/eZPflxm02G6nhZQ= +gomodules.xyz/mergo v0.3.13-0.20220214162359-48efe39fd402/go.mod h1:i2WNHvGpzLKI+/qWRhscddeashtzrtxCAucS2H7hrtM= gomodules.xyz/password-generator v0.2.6/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= gomodules.xyz/password-generator v0.2.7/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= gomodules.xyz/pointer v0.0.0-20201105040656-991dd254b680/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqoplvo= @@ -1096,8 +1097,9 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ kmodules.xyz/client-go v0.0.0-20210617233340-13d22e91512b/go.mod h1:A6GAK6xP5zBuWK6A/vUkkjKzcuywkms7fIxRf5wblO4= kmodules.xyz/client-go v0.0.0-20211107190155-5bb4090d2728/go.mod h1:ENUu8pPK19xzBkVpAJHoGCI2QRvb1SqffWRt0K2sV5I= kmodules.xyz/client-go v0.0.0-20220215012708-9963581d69a7/go.mod h1:sOq5P3AkZdv6D/skvUPwEG15NDYy5olwBllH/JXfhGI= -kmodules.xyz/client-go v0.0.0-20220317213815-2a6d5a5784f2 h1:s6MK8BVV6GHJhS6V4+5IJeV6W1GHcC4fqILencMdRkw= kmodules.xyz/client-go v0.0.0-20220317213815-2a6d5a5784f2/go.mod h1:7pExIHGzUdu8ZGveYvAaXEhS4GdczoOy8z+hq6x6K9A= +kmodules.xyz/client-go v0.0.0-20220404224906-af7b092cfac5 h1:UkXLQ5SMS98RwnJffKAU0ANXVq9AHSLabQ9NKUhkCgA= +kmodules.xyz/client-go v0.0.0-20220404224906-af7b092cfac5/go.mod h1:7pExIHGzUdu8ZGveYvAaXEhS4GdczoOy8z+hq6x6K9A= kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA= kmodules.xyz/crd-schema-fuzz v0.0.0-20211025154117-6edb24ef11bc/go.mod h1:yLOBJKasPhnCodKSZGFZ6OGFFrp0tq3ALS9rDnYFjkg= diff --git a/vendor/kmodules.xyz/client-go/api/v1/timeofday.go b/vendor/kmodules.xyz/client-go/api/v1/timeofday.go index b071abee7..88ea1a8ba 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/timeofday.go +++ b/vendor/kmodules.xyz/client-go/api/v1/timeofday.go @@ -43,8 +43,16 @@ func (t *TimeOfDay) DeepCopyInto(out *TimeOfDay) { // NewTime returns a wrapped instance of the provided time func NewTime(t time.Time) TimeOfDay { - utc := t.UTC() - return TimeOfDay{time.Date(0, 0, 0, utc.Hour(), utc.Minute(), utc.Second(), 0, time.UTC)} + return TimeOfDay{time.Date(0, 0, 0, t.Hour(), t.Minute(), t.Second(), 0, time.UTC)} +} + +// NewTimeInLocation returns a wrapped instance of the provided time according to location +func NewTimeInLocation(t time.Time, loc *time.Location) TimeOfDay { + if loc == nil { + loc = time.UTC + } + t = t.In(loc) + return TimeOfDay{time.Date(0, 0, 0, t.Hour(), t.Minute(), t.Second(), 0, loc)} } // Date returns the TimeOfDay corresponding to the supplied parameters diff --git a/vendor/kmodules.xyz/client-go/meta/incluster.go b/vendor/kmodules.xyz/client-go/meta/incluster.go index 3bdfc4ffc..f5df04dd5 100644 --- a/vendor/kmodules.xyz/client-go/meta/incluster.go +++ b/vendor/kmodules.xyz/client-go/meta/incluster.go @@ -36,7 +36,7 @@ func Namespace() string { return ns } - if ns := os.Getenv("MY_POD_NAMESPACE"); ns != "" { + if ns := os.Getenv("POD_NAMESPACE"); ns != "" { return ns } diff --git a/vendor/modules.txt b/vendor/modules.txt index c2bdea69b..7c4cb559a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -156,7 +156,8 @@ gomodules.xyz/jsonpatch/v2 # gomodules.xyz/logs v0.0.6 ## explicit gomodules.xyz/logs -# gomodules.xyz/mergo v0.3.13-0.20210702100041-9d62ff8ece4d +# gomodules.xyz/mergo v0.3.13-0.20220214162359-48efe39fd402 +## explicit gomodules.xyz/mergo # gomodules.xyz/pointer v0.1.0 gomodules.xyz/pointer @@ -509,7 +510,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# kmodules.xyz/client-go v0.0.0-20220317213815-2a6d5a5784f2 +# kmodules.xyz/client-go v0.0.0-20220404224906-af7b092cfac5 ## explicit kmodules.xyz/client-go kmodules.xyz/client-go/api/v1