-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Remove cmd from kubectl/cmd/factory arguments #4470
Comments
I removed most of the unused arguments. But, There are a few methods still using the |
The factory methods were the most important. The pattern before was people using the flags by name (cmd.Flags().Get("foo")), but now factory methods must use pointer flag vars, so there's nothing that should need the command there. The printer methods are optional units that can be used when you add the flags for them to your command. Unless we refactor the definition of those flags to use pointers and return a printer struct (something I had started a while back and never finished), it's not worth changing them right now. The other consumer of factory is OpenShift - we wrap the factory to add our additional types (implementations of things like describers, action verbs, etc): https://github.com/openshift/origin/blob/master/pkg/cmd/util/clientcmd/factory.go - but we will pick up and remove use of cmd when we rebase.
|
Thanks for the explanation. I've cleaned the |
related issue "Remove cmd from kubectl/cmd/factory arguments kubernetes#4470"
related issue "Remove cmd from kubectl/cmd/factory arguments kubernetes#4470"
cc @krousey |
Looks like this was done by PR #6144 |
@jlowdermilk I think the need for this argument to the factory methods has passed - it means that callers who want to provide configurable behavior have to do it through the factory itself, which is acceptable.
We can remove it whenever.
The text was updated successfully, but these errors were encountered: