-
Notifications
You must be signed in to change notification settings - Fork 93
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
chore(velero): bump velero client to latest 1.15.0 #5066
Open
JGAntunes
wants to merge
6
commits into
main
Choose a base branch
from
jgantunes/sc-117774/bump-velero-to-the-latest-version-v1-15-0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fcedcc3
chore(velero): bump velero client to latest 1.15.0
JGAntunes b4e81ee
chore: should be building now
JGAntunes 74ecee5
chore: timestamp tests are driving me nuts
JGAntunes 7af9f23
chore: fixup more tests
JGAntunes 58f9f86
chore: make k8sutil use a single client
JGAntunes a422a55
Merge branch 'main' into jgantunes/sc-117774/bump-velero-to-the-lates…
JGAntunes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ require ( | |
github.com/spf13/viper v1.19.0 | ||
github.com/stretchr/testify v1.10.0 | ||
github.com/tj/go-spin v1.1.0 | ||
github.com/vmware-tanzu/velero v1.14.1 | ||
github.com/vmware-tanzu/velero v1.15.0 | ||
go.uber.org/multierr v1.11.0 | ||
go.uber.org/zap v1.27.0 | ||
golang.org/x/crypto v0.31.0 | ||
|
@@ -398,6 +398,7 @@ require ( | |
cloud.google.com/go/auth v0.9.8 // indirect | ||
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect | ||
cloud.google.com/go/monitoring v1.21.1 // indirect | ||
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 // indirect | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect | ||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect | ||
|
@@ -417,10 +418,10 @@ require ( | |
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect | ||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect | ||
github.com/hashicorp/logutils v1.0.0 // indirect | ||
github.com/kopia/kopia v0.10.7 // indirect | ||
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect | ||
github.com/kubernetes-csi/external-snapshotter/client/v7 v7.0.0 // indirect | ||
github.com/miekg/dns v1.1.62 // indirect | ||
github.com/moby/docker-image-spec v1.3.1 // indirect | ||
github.com/onsi/ginkgo v1.11.0 // indirect | ||
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect | ||
github.com/shopspring/decimal v1.4.0 // indirect | ||
github.com/tchap/go-patricia/v2 v2.3.1 // indirect | ||
|
@@ -457,8 +458,3 @@ replace ( | |
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce => github.com/dmacvicar/golang-x-crypto v0.0.0-20220126233154-a96af8f07497 | ||
gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2 | ||
) | ||
|
||
// This is the only way I could get these two to play nice together | ||
// When getting github.com/replicatedhq/[email protected] or later, it pulls in github.com/replicatedhq/[email protected] which fails with the following error: | ||
// ../../../../pkg/mod/github.com/vmware-tanzu/[email protected]/pkg/builder/persistent_volume_claim_builder.go:104:32: cannot use dataSourceRef (variable of type *"k8s.io/api/core/v1".TypedLocalObjectReference) as *"k8s.io/api/core/v1".TypedObjectReference value in assignment | ||
replace github.com/vmware-tanzu/velero => github.com/vmware-tanzu/velero v1.10.3 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -11,7 +11,6 @@ import ( | |||||||
flag "github.com/spf13/pflag" | ||||||||
velerov1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" | ||||||||
"k8s.io/apimachinery/pkg/api/meta" | ||||||||
"k8s.io/apimachinery/pkg/runtime" | ||||||||
"k8s.io/apimachinery/pkg/runtime/schema" | ||||||||
"k8s.io/cli-runtime/pkg/genericclioptions" | ||||||||
"k8s.io/client-go/discovery" | ||||||||
|
@@ -37,6 +36,7 @@ var kubernetesConfigFlags *genericclioptions.ConfigFlags | |||||||
func init() { | ||||||||
kubernetesConfigFlags = genericclioptions.NewConfigFlags(false) | ||||||||
embeddedclusterv1beta1.AddToScheme(scheme.Scheme) | ||||||||
velerov1.AddToScheme(scheme.Scheme) | ||||||||
} | ||||||||
|
||||||||
func AddFlags(flags *flag.FlagSet) { | ||||||||
|
@@ -154,7 +154,7 @@ func GetDynamicResourceInterface(gvk *schema.GroupVersionKind, namespace string) | |||||||
return dr, nil | ||||||||
} | ||||||||
|
||||||||
func GetKubeClient(ctx context.Context) (kbclient.Client, error) { | ||||||||
func GetKubeClient(ctx context.Context) (kbclient.WithWatch, error) { | ||||||||
k8slogger := zap.New(func(o *zap.Options) { | ||||||||
o.DestWriter = io.Discard | ||||||||
}) | ||||||||
|
@@ -163,27 +163,7 @@ func GetKubeClient(ctx context.Context) (kbclient.Client, error) { | |||||||
if err != nil { | ||||||||
return nil, errors.Wrap(err, "failed to get cluster config") | ||||||||
} | ||||||||
kcli, err := kbclient.New(cfg, kbclient.Options{}) | ||||||||
if err != nil { | ||||||||
return nil, errors.Wrap(err, "failed to create kubebuilder client") | ||||||||
} | ||||||||
return kcli, nil | ||||||||
} | ||||||||
|
||||||||
func GetVeleroKubeClient(ctx context.Context) (kbclient.Client, error) { | ||||||||
k8slogger := zap.New(func(o *zap.Options) { | ||||||||
o.DestWriter = io.Discard | ||||||||
}) | ||||||||
log.SetLogger(k8slogger) | ||||||||
cfg, err := GetClusterConfig() | ||||||||
if err != nil { | ||||||||
return nil, errors.Wrap(err, "failed to get cluster config") | ||||||||
} | ||||||||
scheme := runtime.NewScheme() | ||||||||
velerov1.AddToScheme(scheme) | ||||||||
kcli, err := kbclient.New(cfg, kbclient.Options{ | ||||||||
Scheme: scheme, | ||||||||
}) | ||||||||
kcli, err := kbclient.NewWithWatch(cfg, kbclient.Options{}) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need the watch interface for our informer:
|
||||||||
if err != nil { | ||||||||
return nil, errors.Wrap(err, "failed to create kubebuilder client") | ||||||||
} | ||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all the velero object interactions now rely on:
kots/pkg/k8sutil/clientset.go
Lines 157 to 171 in a422a55
Which has the scheme set via:
kots/pkg/k8sutil/clientset.go
Lines 36 to 40 in a422a55
We probably don't need this anymore. Nevertheless keeping it for now just be cautious. Once we refactor our client usage across the board and drop a lof of our clientset usages we can take care of removing these.