David Eads
8b20ee1d4e
remove internal factory client
2018-08-03 07:47:05 -04:00
David Eads
bc10b25465
make builder tolerant of restmapper failures when it doesn't need the answer
2018-06-29 11:07:36 -04:00
yue9944882
c5c88006ef
show kind for multiple resource types
...
review: simplify and trim codes
refactor ToPrinter and pass show kind flag
remove tests together with removed function
2018-06-28 11:22:09 +08:00
David Eads
c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method
2018-05-28 15:12:41 +02:00
David Eads
6d117383fc
fix describer tests
2018-05-24 10:50:49 -04:00
juanvallejo
cf29a30258
move Describer from factory
2018-05-24 09:43:28 -04:00
David Eads
eabfcfaa2b
start splitting polymorphic functions out of the factory
2018-05-17 08:55:31 -04:00
David Eads
0db40da909
update factory interface to overlap with lower RESTClientGetter
2018-05-17 08:27:53 -04:00
juanvallejo
876629f690
move ConfigFlags to pkg/kubectl/genericclioptions
2018-05-16 11:31:48 -04:00
David Eads
4b36c15872
remove single use, non-polymorphic helpers from factory
2018-05-15 15:05:49 -04:00
juanvallejo
57f308ae60
restore old cached client behavior
2018-05-15 10:37:53 -04:00
juanvallejo
4059355743
move cached_discovery to client-go/discovery
2018-05-15 10:20:56 -04:00
David Eads
fd044d152e
fix dynamic client name
2018-05-11 13:12:09 -04:00
David Eads
16d6a6c52f
move resource builder to generic options
2018-05-10 14:15:12 -04:00
David Eads
ad87219b2c
category expansion can only come from the server
2018-05-09 15:05:58 -04:00
David Eads
37f6cb7230
move category expansion types to restmapper package
2018-05-09 15:03:09 -04:00
David Eads
3cb7d25959
push ToRESTMapper down a layer
2018-05-09 11:18:26 -04:00
David Eads
c5445d3c56
simplify api registration
2018-05-08 18:33:50 -04:00
David Eads
dd97a7bc59
move client based restmappers to client-go
2018-05-08 08:11:56 -04:00
juanvallejo
3ca222b2d9
wire config flags through factory
2018-05-04 17:02:20 -04:00
Kubernetes Submit Queue
238fda9e52
Merge pull request #63318 from deads2k/cli-40-mapperfunc
...
Automatic merge from submit-queue (batch tested with PRs 63315, 63383, 63318, 63439). 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>.
drive resourcebuilder from kubeconfig, allow scheme specification
This updates the resource builder to work based on a kubeconfig to allow future chaining of flags. It also allow specification of the scheme you want for your actual decoding.
@kubernetes/sig-cli-maintainers
```release-note
NONE
```
2018-05-04 12:41:12 -07:00
David Eads
b8aa7baa7d
simplify resource builder usage
2018-05-04 13:02:49 -04:00
David Eads
94e3d94d67
update tests to be specific about the versions they are testing instead of floating
2018-05-01 13:18:41 -04:00
David Eads
1cb797e355
acknowledge that creation of a restmapper can fail and that we cannot have a default
2018-05-01 07:52:51 -04:00
David Eads
ef0d1ab819
remove incorrect static restmapper
2018-05-01 07:51:17 -04:00
Kubernetes Submit Queue
7884cc5453
Merge pull request #63250 from deads2k/cli-39-typer
...
Automatic merge from submit-queue (batch tested with PRs 63251, 59166, 63250, 63180, 63169). 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>.
divide statically known typer from dynamically derived restmapper
The CLI factory conflated a statically known typer and a dynamically derived restmapper. This produced confusion and unnecessary indirection. This pull separates dynamically known from statically known.
A future pull will continue the separation of in the builder to indicate the points of variability for clients, which should logically be limited to a negotiated serializer for decoding and an object typer.
@kubernetes/sig-cli-maintainers
/assign @soltysh
/assign @juanvallejo
```release-note
NONE
```
2018-04-27 10:45:13 -07:00
David Eads
5432ef5c45
divide statically known typer from dynamically derive restmapper
2018-04-27 11:15:05 -04:00
David Eads
6fbcbc994f
remove unnecessarily flexibiliy to simplify the resource builder
2018-04-27 09:27:51 -04:00
David Eads
e2fc5cf259
remove versioning interface
2018-04-27 07:56:42 -04:00
David Eads
b8177bb9af
tighten .Info for kubectl to avoid unpredictable conversion
2018-04-26 12:47:25 -04:00
David Eads
6900f8856f
rest mappings cannot logically be object converters
2018-04-26 12:47:25 -04:00
David Eads
a89291a5de
stop duplicating preferred version order
2018-04-26 10:03:36 -04:00
David Eads
0710f72c65
remove confusing flexibility for metadata interpretation
2018-04-23 13:31:55 -04:00
p0lyn0mial
1f1d24005a
removes custom scalers from kubectl
2018-03-26 19:33:42 +02:00
juanvallejo
8d35f94d51
use temp kubeconfig for fake factory
2018-03-09 15:53:19 -05:00
David Eads
6047ead2e5
simplify kubectl testing factory
2018-02-23 08:02:53 -05:00
Kubernetes Submit Queue
4f083dee54
Merge pull request #60208 from soltysh/remove_factory_metricsclient_method
...
Automatic merge from submit-queue. 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>.
Remove factory metricsclient method
**What this PR does / why we need it**:
Alternative approach to https://github.com/kubernetes/kubernetes/pull/60142 which fixed the `NewCmdTopPod` return arguments
/assign @deads2k
**Release note**:
```release-note
None
```
2018-02-22 22:45:58 -08:00
Maciej Szulik
999273fbd7
Remove ClientSetForVersion & ClientConfigForVersion from factory
2018-02-22 15:50:27 +01:00
David Eads
f084311326
remove metrics client factory method
2018-02-22 07:45:04 -05:00
Kubernetes Submit Queue
7d64d30177
Merge pull request #60094 from juanvallejo/jvallejo/remove-printobjectspecificmessage
...
Automatic merge from submit-queue. 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>.
remove f.PrintObjectSpecificMessage
**Release note**:
```release-note
NONE
```
Mailing list discussion: https://groups.google.com/forum/#!topic/kubernetes-sig-cli/gZWg8Ulo3Ao
Removes the `PrintObjectSpecificMessage` helper in an effort to reduce printing stack complexity, and avoid special-casing resources.
2018-02-22 00:35:21 -08:00
juanvallejo
e3d81517ae
remove f.PrintObjectSpecificMessage
2018-02-21 21:06:49 -05:00
David Eads
d8a5420b7c
remove unneeded factory codec methods
2018-02-21 15:20:20 -05:00
David Eads
be04e7c1b1
collapse printing paths
2018-02-21 08:15:22 -05:00
David Eads
dd6405681f
cleanup printers some more
2018-02-20 12:59:40 -05:00
juanvallejo
beb5ea641a
remove mapper dependency - PrintSuccess
2018-02-07 10:10:45 -05:00
Frederic Branczyk
b1448adb59
kubectl: Use metrics-server for kubectl top commands
2018-01-22 21:45:06 +01:00
juanvallejo
f5ab356043
pass printOpts by pointer
2017-11-20 14:49:23 -05:00
juanvallejo
d3773b4b06
consolidate printer OutputOpts w PrintOpts
...
This patch removes the use of printers.OutputOptions in favor of only
having a single struct for setting / passing printer options set by user
flags.
2017-11-20 14:49:23 -05:00
Clayton Coleman
8f4b6c8771
All commands must declare Unstructured or Internal
...
Callers must take a dependency on one or the other set of conversions
and default client behavior. Future changes may add a Versioned() type,
but this is an accurate reflection of current code state.
2017-11-19 20:41:02 -05:00
Clayton Coleman
04ab96d2bd
Unify Object and UnstructuredObject
...
The unified RESTMapper and Typer follow the new rules, but on error will
fallback to the legacy path (while still supporting Unstructured
objects). This allows callers to handle the appropriate distinction
themselves if necessary.
Add a LocalParam() method to the resource.Builder that DRYs up a large
chunk of complicated code in set commands.
2017-11-19 19:16:50 -05:00