Commit Graph

65 Commits

Author SHA1 Message Date
Jingfang Liu
b38cf738d6 update kubectl subcommand with -k changes 2019-02-25 16:30:50 -08:00
Yang Li
141d33a2a5 Fix some golint errors for packages in pkg/kubectl/cmd
Co-authored-by: Arijit Basu <sayanarijit@gmail.com>
2018-11-22 22:09:08 +08:00
Sean Sullivan
68cea87cfd kubectl: remove unnecessary internal->external conversion before PrintObj 2018-11-02 10:03:52 -07:00
Maciej Szulik
21789b85a6
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/temlpates 2018-10-11 22:01:03 +02:00
Christoph Blecker
97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
k8s-ci-robot
34860dafe2
Merge pull request #69150 from soltysh/issue69144
Fix panic in kubectl rollout commands
2018-09-27 11:07:56 -07:00
Maciej Szulik
96d01da215
Fix panic in kubectl rollout commands 2018-09-27 15:10:52 +02:00
Pingan2017
8593c02665 fix panic: kubectl rollout undo 2018-09-27 19:16:38 +08:00
Sean Sullivan
7a2a987ee4 Move legacyscheme (internal version) to kubectl scheme (external version) 2018-09-18 14:24:47 -07:00
Antoine Pelisse
967280b58e Add --server-dry-run flag to kubectl apply 2018-09-02 13:13:46 -07:00
Maciej Szulik
5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
juanvallejo
2b0b605c80
wire PrintFlags through rollout commands
Binds PrintFlags to rollout commands.
Adds tests ensuring --template printing is supported by rollout cmds.
2018-07-06 17:32:42 -04:00
David Eads
c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
Kubernetes Submit Queue
7a7ab200ee
Merge pull request #64242 from WanLinghao/ctl_print_fix
Automatic merge from submit-queue (batch tested with PRs 63417, 64249, 64242, 64128, 64275). 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>.

fix bugs that break processing when printing errors occur in kubectl

**What this PR does / why we need it**:
The process should continue when error happens, this patch fix the problem
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-24 20:49:15 -07:00
WanLinghao
b020a4ba8c fix bugs that break processing when printing errors occur in kubectl 2018-05-24 09:57:25 +08:00
juanvallejo
fb0794976a move Pauser and Resumer from the factory 2018-05-23 10:27:20 -04:00
juanvallejo
d1603c9560 move PrintOptions to genericclioptions 2018-05-21 14:59:41 -04:00
David Eads
420dd9bf66 move type setting into an optional layer above normal printing 2018-05-17 17:22:12 -04:00
Kubernetes Submit Queue
143d3b8824
Merge pull request #63561 from juanvallejo/jvallejo/make-opinionated-print-flags-constructor
Automatic merge from submit-queue (batch tested with PRs 63669, 63511, 63561, 63289). 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 legacyscheme dep from printFlags

**Release note**:
```release-note
NONE
```

Breaks PrintFlags dependency on legacyscheme
Prerequisite to https://github.com/kubernetes/kubernetes/pull/63402

cc @deads2k @soltysh
2018-05-10 14:25:16 -07:00
juanvallejo
40e52bf07d remove legacyscheme dep from printFlags 2018-05-10 14:51:12 -04:00
David Eads
16d6a6c52f move resource builder to generic options 2018-05-10 14:15:12 -04:00
David Eads
682e028516 stop pretending that we have statically known shortcuts 2018-05-08 08:11:56 -04:00
David Eads
b8aa7baa7d simplify resource builder usage 2018-05-04 13:02:49 -04:00
David Eads
9a48066749 update restmapping to indicate fully qualified resource 2018-05-01 16:34:49 -04:00
David Eads
1e5372b620 get the resource.Info out of the conversion business 2018-05-01 07:58:42 -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
juanvallejo
f432ebe262
finish wiring PrintFlags 2018-04-27 21:41:03 +02: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
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
juanvallejo
beb5ea641a
remove mapper dependency - PrintSuccess 2018-02-07 10:10:45 -05:00
Di Xu
1c715d51c4 some code change
fix wrong required flags

disable the addition of [flags] to the usage, use customized useline

fix function rename
2017-12-25 16:23:38 +08: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
juanvallejo
701d6536a2
move cmd/util/printing.go#PrintSuccess to factory_builder.go 2017-11-15 10:46:39 -05:00
juanvallejo
90d76adb4b
add Local and Unstructured builder attributes
Moves DisabledClientMapperForMapping wrapper to new Local attribute.
Removes Factory#NewUnstructuredBuilder in favor of new Unstructured
builder attribute.
2017-09-05 11:57:00 -04:00
ymqytw
b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
Alexander Campbell
6fd36c10ad kubectl/cmd: many small refactors
* Rename variables and functions to match Go convention.
   For example, UsageError --> UsageErrorf.
 * Remove redundant or unreachable code.
 * Simplify some utility functions (no functionality changes).
 * Fix hanging 'if { return } else { return }' constructs.
 * Fix several incorrect printf verbs.
2017-06-27 16:25:20 -07:00
juanvallejo
d036686185
fix --local flag for kubectl set commands 2017-06-13 12:57:05 -04:00
Janet Kuo
edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
deads2k
8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
Brendan Burns
700b6b3b7b Extract strings from the rollout command. 2017-02-11 22:15:10 -08:00
deads2k
26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Angus Salkeld
17a711d8fd Add new command "kubectl set selector" 2016-12-21 12:30:56 +01:00
ymqytw
3cc294b1e0 Revert "support patch list of primitives"
This reverts commit 34891ad9f6.
2016-11-22 21:06:36 -08:00
ymqytw
d248843b65 Revert "try old patch after new patch fails"
This reverts commit f32696e734.
2016-11-22 21:02:30 -08:00
ymqytw
f32696e734 try old patch after new patch fails 2016-11-17 14:28:09 -08:00
ymqytw
34891ad9f6 support patch list of primitives 2016-11-09 11:46:59 -08:00
Michal Fojtik
0faa27e62d Use PATCH when pausing/resuming objects and CalculatePatches to get the patch 2016-10-31 13:13:59 +01:00