openshift-kni / eco-goinfra

Apache License 2.0
6 stars 32 forks source link

Limit scope of 'apiClient' var in builder in 'Node' package #272

Closed sebrandon1 closed 4 months ago

sebrandon1 commented 4 months ago

Building on ideas from #270 after talking with @kononovn

Instead of copying the entire client.Settings struct, only keep around the kubernetes.Interface that you use during some of these Node operations. This could also apply to all of the other k8s-related object funcs/pkgs.

This will help ease-of-use when writing unit tests that target this code as well because you don't have to worry about the other clients, just the kubernetes.Fake clientset.

Does not break any public functionality.

achuzhoy commented 4 months ago

/lgtm