Commit Graph

66 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Darren Shepherd 297b309740 Remove kustomize 2019-08-19 08:33:22 -07:00
Ilya Dmitrichenko 6d7a9048b6
Move printers & resources packages
These packages deserve to live at the top level of `k8s.io/cli-runtime`,
as they are potentially of wider use than genericclioptions.
2019-03-07 23:00:24 +00:00
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
k8s-ci-robot d4c4871852
Merge pull request #69413 from seans3/rollback-fix
kubectl rollback: remove legacyscheme dependency
2018-10-08 13:02:19 -07:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Sean Sullivan 95ec1f79b9 kubectl rollback: remove legacyscheme dependency 2018-10-04 13:13:32 -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
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
juanvallejo b6db623799 move rollbacker from the factory 2018-05-23 10:44:01 -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
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 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 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
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
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
crimsonfaith91 ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07: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 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Fabiano Franz f6d1ac72a0 Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
AdoHe b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
Kubernetes Submit Queue ea688f5e44 Merge pull request #31276 from juanvallejo/jvallejo_update-dry-run-create
Automatic merge from submit-queue

Update kubectl create message when using --dry-run

`kubectl create <resource> <name> --dry-run` provides a misleading success
message.

When commands such as `kubectl new-app node` are run with a
`--dry-run` flag, they make this clear by appending a "(DRY RUN)"
string to the final output. `kubectl create <resource>  <name> --dry-run`
does not do this, providing a potentially misleading output.

This patch appends a "(DRY RUN)" string to the end of a successful
message of `kubectl create` subcommands that support the `--dry-run` flag.

`kubectl create quota quota --dry-run`
```
resourcequota "quota" created
```

`kubectl create quota quota --dry-run`
```
resourcequota "quota" created (DRY RUN)
```

**Release note**:
```release-note
release-note-none
```
2016-09-26 16:01:17 -07:00
Kubernetes Submit Queue 2941069307 Merge pull request #32894 from deads2k/cli-01-remove-arg
Automatic merge from submit-queue

make --include-extended-apis deprecated and remove plumbing

Marks a dead CLI parameter as deprecated and removes the plumbing for it.
2016-09-19 21:11:04 -07:00
deads2k 862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
juanvallejo 52fc8efa55 update PrintSuccess message when using --dry-run 2016-09-15 10:11:21 -04:00