-
Notifications
You must be signed in to change notification settings - Fork 57
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
e2e: replace kubernetes.Clientset with client.Client #1680
Conversation
0b5116e
to
1e52a3e
Compare
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.
Nice cleanup!
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]>
1e52a3e
to
51d05ba
Compare
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.
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" |
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.
Do we really need to rename? Client
field does not clash with client
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.