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

e2e: replace kubernetes.Clientset with client.Client #1680

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

raghavendra-talur
Copy link
Member

Just simplifying the code a bit more. We were using kubernetes.Clientset for things where we couldn't figure out how to use client.Client.

@raghavendra-talur raghavendra-talur force-pushed the rtalur-remove-clientset-client branch 2 times, most recently from 0b5116e to 1e52a3e Compare November 26, 2024 08:29
Copy link
Member

@nirs nirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

e2e/util/context.go Outdated Show resolved Hide resolved
e2e/util/context.go Outdated Show resolved Hide resolved
e2e/util/validation.go Show resolved Hide resolved
e2e/util/validation.go Show resolved Hide resolved
e2e/util/validation.go Show resolved Hide resolved
e2e/util/validation.go Show resolved Hide resolved
Just simplifying the code a bit more. We were using kubernetes.Clientset
for things where we couldn't figure out how to use client.Client.

Signed-off-by: Raghavendra Talur <[email protected]>
as that is the only Client we have in the cluster context now.

To avoid shadowing of the client package from controller-runtime, the
package import name is changed to CtrlClient now.

Signed-off-by: Raghavendra Talur <[email protected]>
@raghavendra-talur raghavendra-talur force-pushed the rtalur-remove-clientset-client branch from 1e52a3e to 51d05ba Compare December 5, 2024 08:46
Copy link
Member

@nirs nirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can simplify the import but we can do this later.

@@ -11,7 +11,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/kubectl/pkg/scheme"
"sigs.k8s.io/controller-runtime/pkg/client"
ctrlClient "sigs.k8s.io/controller-runtime/pkg/client"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to rename? Client field does not clash with client

@nirs nirs merged commit 969fa6e into RamenDR:main Dec 5, 2024
22 of 23 checks passed
@raghavendra-talur raghavendra-talur deleted the rtalur-remove-clientset-client branch December 5, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants