Commit Graph

73 Commits (c582a37cae02b4d1a850e6668ea8ea0a81dcd204)

Author SHA1 Message Date
David Eads 8a1eae451b stop adding internal types to external schemes 2018-08-03 09:47:04 -04:00
David Eads 8b20ee1d4e remove internal factory client 2018-08-03 07:47:05 -04:00
Mikhail Mazurskiy bfe313d5f3
Add missing error handling in schema-related code 2018-06-23 21:06:32 +10:00
David Eads c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02: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
Di Xu e8ef744493 fix missing flag value bindings in kubectl 2018-05-14 14:38:54 +08:00
juanvallejo 40e52bf07d remove legacyscheme dep from printFlags 2018-05-10 14:51:12 -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 8c1b687356 update more commands for iostreams 2018-04-25 08:45:15 -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
juanvallejo 0aec803a9c
wire pritnflags through run cmd 2018-04-18 11:35:34 -04:00
juanvallejo 285d696157
add delete flags 2018-04-16 16:48:39 -04:00
juanvallejo ecaddbfc36
update delete, replace, run cmds 2018-04-16 16:48:39 -04:00
Cao Shufeng edce292a1f Remove invalid comments in unit tests 2018-03-10 15:08:12 +08: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
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
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
ymqytw 4487cc5e15 switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
Solly Ross eac2049fc9 [client-go] avoid Registry in fake REST client
Previously, the fake RESTClient in client-go required a Registry.  It
used the Registry to fetch the GroupVersion for the fake client.
However, the way it did so was dubious in some cases (it hard-coded the
default API group in places), and not strictly necssary.

This updates the fake client to just recieve the GroupVersion and
internal group name directly, instead of requiring a Registry, so that
it can be consumed in unit tests where a Registry isn't necessarily
readily available (e.g. elsewhere in client-go).
2017-10-19 11:01:44 -04:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
ymqytw b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
Cao Shufeng 292b18db1f enhance kubectl run error message
Before this change:
 # kubectl run nginx
 error: Invalid image name "": invalid reference format

After this change:
 # kubectl run nginx
 error: --image is required
2017-07-26 11:24:03 +08:00
Kubernetes Submit Queue 575cbdf7d4 Merge pull request #45012 from xiangpengzhao/fix-delete-svc
Automatic merge from submit-queue

Remove service on termination when exec 'kubectl run' command with flags "--rm" and "--expose"

**What this PR does / why we need it**:
As the title says and issue #40504 mentioned.
cc @tanapoln

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

**Special notes for your reviewer**:
Related to: #44915

**Release note**:

```release-note
NONE
```
2017-07-19 07:59:34 -07:00
Kubernetes Submit Queue 6d69f18f5b Merge pull request #46845 from zhangxiaoyu-zidif/change-fatalf
Automatic merge from submit-queue

Use t.Fatalf instead

**What this PR does / why we need it**:
we can use t.Fatalf to take place of t.Errorf + t.FailNow()


**Release note**:

```release-note
NONE
```
2017-07-13 21:26:07 -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
Alexander Campbell d29560d89a kubectl: rename Run() -> RunRun() to clarify purpose
Run() is too overloaded in the codebase already. The other commands have
a pattern of RunExpose, RunScale, and so on. Since the command name is
"run", the associated function should be called RunRun.
2017-06-23 09:49:30 -07:00
xiangpengzhao aef9f38baf Remove service on termination when exec 'kubectl run' command with flags "--rm" and "--expose" 2017-06-23 11:36:40 +08:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
zhangxiaoyu-zidif 02af4b31a6 Use t.Fatalf instead 2017-06-02 17:35:33 +08:00
Daniel Smith d6e1140b5d Implement dynamic admission webhooks
Also fix a bug in rest client
2017-05-31 16:38:46 -07:00
Brendan Burns 79f51923d3 Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
Maciej Szulik aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01:00
deads2k c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
deads2k 502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Kubernetes Submit Queue 71ba8a90f0 Merge pull request #35732 from fabianofranz/run_cant_dryrun_with_attach
Automatic merge from submit-queue

Better kubectl run validations

Adds more validations to flags that must be mutually exclusive in `kubectl run`. For example, `--dry-run` must not be used with `--attach`, `--stdin` or `--tty`. Adds unit tests for these new validations and some previously existing ones.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```
2016-10-30 13:07:28 -07:00
Chao Xu fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
Fabiano Franz bc1a1d7b30 Better kubectl run validations 2016-10-27 20:05:26 -02:00