kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
154 stars 77 forks source link

Consistently use InfoHelper to get rest client #472

Closed ash2k closed 2 years ago

ash2k commented 2 years ago

This started as a follow up for https://github.com/kubernetes-sigs/cli-utils/pull/430#issuecomment-953455611 to pass version to the mapper to construct a correctly versioned inventory client, but then I noticed that all the required information is already present in the resource.Info object. After that I got some failing tests and it turned out there was some duplication of functionality between InfoHelper and the factory. I've replaced duplicated code with factory function invocation. I think it's a nice cleanup in the end.

ash2k commented 2 years ago

/assign @seans3

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ash2k, seans3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/cli-utils/blob/master/OWNERS)~~ [seans3] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
seans3 commented 2 years ago

/retest