Commit Graph

159 Commits

Author SHA1 Message Date
Maciej Szulik
383872615d
Remove kubectl reapers 2018-05-25 22:18:05 +02:00
Kubernetes Submit Queue
6e1727a865
Merge pull request #64114 from juanvallejo/jvallejo/remove-command-method-from-factory
Automatic merge from submit-queue (batch tested with PRs 59851, 64114, 63912, 64156, 64191). 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>.

move f.Command out of the factory

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

Moves the "f.Command" method out of factory_client_access

cc @soltysh
2018-05-23 09:06:11 -07:00
juanvallejo
0d3e85608f move f.Command out of the factory 2018-05-22 13:31:01 -04:00
David Eads
76794643c5 add wait 2018-05-22 08:47:42 -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
David Eads
0db40da909 update factory interface to overlap with lower RESTClientGetter 2018-05-17 08:27:53 -04:00
David Eads
fd044d152e fix dynamic client name 2018-05-11 13:12:09 -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
Kubernetes Submit Queue
4868d7775a
Merge pull request #63511 from juanvallejo/jvallejo/cmd-cleanup
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>.

cleanup TODOs from PrintFlags wiring

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

Address TODOs from PrintFlags wiring

cc @soltysh @deads2k
2018-05-10 14:25:13 -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
juanvallejo
7b1b107ea4 cleanup TODO comments from PrintFlags wiring 2018-05-10 14:03:06 -04:00
David Eads
c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
David Eads
facd04be43 use IOStreams for cli commands 2018-05-08 09:02:34 -04:00
David Eads
a53a72e238 udpate some examples to use external types 2018-05-04 13:02:49 -04:00
David Eads
b8aa7baa7d simplify resource builder usage 2018-05-04 13:02:49 -04:00
David Eads
b8177bb9af tighten .Info for kubectl to avoid unpredictable conversion 2018-04-26 12:47:25 -04:00
David Eads
0710f72c65 remove confusing flexibility for metadata interpretation 2018-04-23 13:31:55 -04:00
David Eads
8ef56776b9 provide standard iostream struct for commands 2018-04-20 12:54:11 -04:00
juanvallejo
d9f2657647
aggregate objs before printing in apply cmd 2018-04-19 19:39:10 -04:00
juanvallejo
89b72743e3
wire print flags through apply cmd 2018-04-19 12:55:55 -04:00
Kubernetes Submit Queue
8e9eb4fcef
Merge pull request #62848 from deads2k/cli-29-more-record
Automatic merge from submit-queue (batch tested with PRs 62632, 62789, 62512, 62848). 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>.

use recordFlags to manage recording

This updates the set commands to use the recordflags and updates the commands we're touching to follow the pattern that is emerging.  A method for New*Options, a valid default value for a recorder there, using the value `o` everywhere to refer to options, naming the struct `<commandName>Options`.

@kubernetes/sig-cli-maintainers 
@soltysh @juanvallejo continues the effort

```release-note
NONE
```
2018-04-19 08:58:20 -07:00
David Eads
484d81ab01 use recordFlags 2018-04-19 08:50:01 -04:00
David Eads
f01e16bb3e remove flags deprecated in 1.5 2018-04-19 08:08:44 -04:00
David Eads
e2a5c39b23 use record flags 2018-04-18 13:56:59 -04:00
Kubernetes Submit Queue
aba9d41ec0
Merge pull request #62664 from juanvallejo/jvallejo/add-record-flags-struct
Automatic merge from submit-queue (batch tested with PRs 62436, 62499, 62664, 62685, 62660). 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>.

begin adding record flags struct

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

Begins wiring RecordFlags through the apply command.

cc @soltysh @deads2k
2018-04-17 17:31:16 -07:00
juanvallejo
813a854b99
begin adding record flags struct 2018-04-16 16:53:23 -04:00
Maciej Szulik
d12a8a8d48
Move all create subcommands to its own subdirectory 2018-04-12 23:47:31 +02:00
Kubernetes Submit Queue
08f931d84a
Merge pull request #59285 from Addepar/fix-apply-logging
Automatic merge from submit-queue (batch tested with PRs 59285, 61216). 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>.

Do not log unchanged message if a format other than 'name' is specified

**What this PR does / why we need it**:
When specifying an output format, the "unchanged" message screws up the output format.

**Which issue(s) this PR fixes**:
Fixes #58836

**Special notes for your reviewer**: N/A

**Release note**:

```release-note
NONE
```
2018-04-05 19:49:06 -07:00
Kubernetes Submit Queue
76ffe9e832
Merge pull request #58787 from Lion-Wei/kubectl-3
Automatic merge from submit-queue (batch tested with PRs 60499, 61715, 61688, 61300, 58787). 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 kubectl apply error message

**What this PR does / why we need it**:
Fix messy code in kubectl apply error message. 

**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 kubernetes/kubectl#197

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
/sig cli
2018-03-27 04:08:15 -07:00
p0lyn0mial
1f1d24005a removes custom scalers from kubectl 2018-03-26 19:33:42 +02:00
Lion-Wei
e2dedc76a8 fix kubectl apply error message 2018-03-17 15:08:26 +08:00
Di Xu
9555debc82 flag value bindings for kubectl apply commands 2018-03-08 10:32:59 +08:00
David Hao
b112d19b70 Do not log unchanged message if a format other than 'name' is specified 2018-02-26 18:34:40 -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
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Kubernetes Submit Queue
15dbd4e2ae
Merge pull request #59227 from juanvallejo/jvallejo/remove-mapper-dep-printer
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 mapper dependency for cmdutil.Factory#PrintSuccess

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

Part of a series of patches removing printing stack dependency on mappings the rest mapper

**Before**
```
$ kubectl label pod/my-pod label=label
pod "my-pod" labeled
```

**After**
```
$ kubectl label pod/my-pod label=label
pods "my-pod" labeled
```

cc @deads2k
2018-02-07 08:39:15 -08:00
juanvallejo
beb5ea641a
remove mapper dependency - PrintSuccess 2018-02-07 10:10:45 -05:00
Kubernetes Submit Queue
313f443015
Merge pull request #58991 from juanvallejo/jvallejo/fix-apply-force
Automatic merge from submit-queue (batch tested with PRs 51323, 59306, 58991, 59050). 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 apply --force w/ invalid resource

Fixes https://github.com/kubernetes/kubernetes/issues/58984

- First commit: Fixes cases where `--force` is provided with `kubectl apply`, with an object that is BOTH invalid and will cause a conflict error
- Second commit: Fixes cases where `--force` is provided with `kubectl apply`, with an invalid object 

Justification for the first commit here: https://bugzilla.redhat.com/show_bug.cgi?id=1539529#c3

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

cc @ironcladlou
2018-02-06 10:40:37 -08:00
Kubernetes Submit Queue
989e4f868b
Merge pull request #51323 from dixudx/conflict_flags
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>.

kubectl should return an error if "-l" and "--all" are both specified

**What this PR does / why we need it**:
Per discussion in [#50497](https://github.com/kubernetes/kubernetes/pull/50497#discussion_r134881507)

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
/assign @caesarxuchao @mengqiy 

**Release note**:

```release-note
kubectl should return an error if "-l" and "--all" are both specified
```
2018-02-06 10:00:47 -08:00
juanvallejo
ef0e40d39c
fix apply --force w/ invalid AND conflicting resource 2018-02-06 11:29:00 -05:00
Di Xu
e45117856e kubectl: cannot set --all and --selector at the same time 2018-02-06 23:55:36 +08:00
Kubernetes Submit Queue
8e666feac2
Merge pull request #57322 from niuzhenguo/dry-run-flag-cleanup
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>.

Use GetDryRunFlag to keep consistent

**What this PR does / why we need it**:
There's a cmd util GetDryRunFlag, but we still get 'dry-run' directly somewhere. This PR makes them consistent.

**Release note**:

```release-note
NONE
```
2018-01-29 20:04:54 -08: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
Zhenguo Niu
86cc625a55 Use GetDryRunFlag to keep consistent 2017-12-18 19:28:55 +08:00
ymqytw
ed0dcb7498 build patch from openapi only for registered types 2017-12-01 13:44:11 -08:00
ymqytw
0b0004e0c0 support openapi in apply 2017-11-21 10:22:43 -08:00
Clayton Coleman
7563a0c4d8
Remove unstructured error checking from affected code
Also remove error messages that depended on ObjectKinds() - future
changes will potentially remove this interface and the replacements here
are equivalent.
2017-11-19 19:16:50 -05:00