Skip to content

Change remote.NewClusterClient to return a controller-runtime client.Client #1606

@ncdc

Description

@ncdc

The current signature

func NewClusterClient(c client.Client, cluster *clusterv1.Cluster) (ClusterClient, error)

should be changed to

func NewClusterClient(c client.Client, cluster *clusterv1.Cluster, scheme runtime.Scheme) (client.Client, error)

It would be nice to omit scheme, but I'm not sure if that's possible.

The reason for making this change is that it reduces our use on typed clients - the ClusterClient interface uses the CoreV1() typed clientset.

Because the drain code uses client-go's type client kubernetes.Interface, we will probably need to create a new RestConfig() method (used by

kubeClient, err = kubernetes.NewForConfig(remoteClient.RESTConfig())
)

/priority important-longterm
/help
/kind cleanup

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions