Merge pull request #64328 from deads2k/cli-70-onefactory
Automatic merge from submit-queue (batch tested with PRs 64355, 64328, 64352). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
collapse into one factory
We've stripped enough out of the factory that we can strip down to a single factory instead of ringed set.
@kubernetes/sig-cli-maintainers
Nothing else should be added to the factory. Instead we should build particular constructors atop the RESTClientGetter and structure commands with clear wiring stages and execution stages to simplify the unit testing for each piece. See https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/wait/wait.go . It is easily unit testable with "standard" mocks and constructs as compared to using the factory as an injector an retesting a builder to act as a surrogate API server using a different client mocking mechanism.
@soltysh @juanvallejo I'm fine with this after your currently open snips.
```release-note
NONE
```
Showing
Please
register
or
sign in
to comment