Commit Graph

58 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
6fe8ed738d Merge pull request #39401 from AdoHe/delete_refactor
Automatic merge from submit-queue (batch tested with PRs 39806, 39887, 39401)

refactor delete to remove cobra dependency

FYI. As part of CLI Q1 roadmap, we would like to reduce the dependency of Cobra from actual commands implementations. In this PR, I tried to refactor delete command to achieve this. @kubernetes/sig-cli-misc a quick review is quite welcome, and I am just working on more PRs.
2017-01-16 13:41:36 -08:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
AdoHe
d6d82425a4 refactor delete to remove cobra dependency 2017-01-15 15:30:06 +08: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
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman
7cdb6b169d
When --grace-period=0 is provided, wait for deletion
The grace-period is automatically set to 1 unless --force is provided,
and the client waits until the object is deleted.

This preserves backwards compatibility with 1.4 and earlier. It does not
handle scenarios where the object is deleted and a new object is created
with the same name.
2016-11-23 15:02:43 -06:00
deads2k
61673c4b39 make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
deads2k
7fe9bd4c30 make kubectl delete generic 2016-11-04 07:50:31 -04:00
Chao Xu
fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
Angus Salkeld
d58554a647 Move the common test functions from cmd_test.go to cmd/testing/fake.go
This is so that we can use NewAPIFactory() from cmd/set/*test.go
Up until now we would get a import loop error.

This commit also adds a basic unit test case for cmd/set/set_image.go
2016-10-19 08:53:26 +10:00
deads2k
518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
ymqytw
c67a62da49 Fixes #30562: Refactor kubectl command options to use common struct for common file params 2016-09-12 11:01:37 -07:00
Brendan Burns
d1fa7ff7a8 Address comments. 2016-08-31 21:16:46 -07:00
Wojciech Tyczynski
7403564366 Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot
42a5654383 Merge pull request #25612 from mbohlool/fix_error_msg
Automatic merge from submit-queue

Fixed misleading error message when a resource with no selector or na…

Commit:
- Fixed misleading error message when a resource with no selector or name is provided to kubectl delete or label command

This commit fixes #25541
2016-06-29 10:52:25 -07:00
Clayton Coleman
e5fbf86157
Allow StatusErrors to be modified after creation 2016-05-19 09:08:53 -04:00
amehdy
0c5713084b Fixed misleading error message when a resource with no selector or name is provided to kubectl delete or label command 2016-05-14 02:04:35 -07:00
Wojciech Tyczynski
5d046fed41 Fix tests for renegotiation 2016-05-12 08:21:11 +02:00
Janet Kuo
c1596e6711 Update guestbook examples; replace RC concepts with Deployment 2016-03-30 14:16:52 -07:00
deads2k
9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
deads2k
2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Kris
eacf65ddce Renaming HTTPClientFunc to CreateHTTPClient 2015-11-11 11:54:58 -08:00
Chao Xu
cbb3deb182 run goimports 2015-10-12 13:31:45 -07:00
Chao Xu
50a2c4c643 grep-sed 2015-10-12 13:31:45 -07:00
Chao Xu
ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
deads2k
f1b81ff678 bind filenames var instead of looking up 2015-09-01 08:35:57 -04:00
feihujiang
943c57ff4e Allow delete multiple resources with the same name 2015-08-24 15:14:01 +08:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Eric Paris
7cbb52ce04 Use the pflag StringSlice instead of implementing it ourselves
Saves code and makes our code easier to read because we just use normal
[]string instead of custom type.
2015-08-06 19:16:13 -04:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Janet Kuo
0e42d0699a Add '-o name' to mutations 2015-07-27 14:06:53 -07:00
Jordan Liggitt
85fd52126d Default --ignore-not-found to true for delete --all 2015-07-23 18:08:15 -07:00
Chao Xu
59b654c996 fix tests for 22f1b07858 2015-06-22 17:10:09 -07:00
Anastasis Andronidis
64d984ae2e changed printing in a test file 2015-06-18 18:34:07 +02:00
Jeff Lowdermilk
3cf4d9b2e6 Delete fails on notfound errors.
If deleting multiple resources, command will continue on error and
report not found resources at the end.
2015-05-27 16:02:54 -07:00
Clayton Coleman
dd8184247e Merge pull request #7629 from caesarxuchao/new-fix-7260-7491
Change the order the different versions of API are registered
2015-05-04 15:01:59 -04:00
Chao Xu
4787c66214 Register the API versions to the DefaultRESTMapper in the order of preferred versions first.
This makes kubectl sends requests to URLs in the format defined by the latest API version.
2015-05-01 15:14:15 -07:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Brendan Burns
e1256c0802 Make delete actually stop resources by default.
Refactor for shared code.
2015-04-28 14:36:43 -07:00
nikhiljindal
1e323d77bc Updating the guestbook example to v1beta3 2015-04-23 14:34:36 -07:00
Jordan Liggitt
feb8ba9c4e Allow resource builder to avoid fetching objects 2015-04-20 15:00:52 -04:00
deads2k
6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -04:00
Daniel Smith
44bc29631e compute query parameter names in the client. 2015-04-06 16:54:26 -07:00
Jeff Lowdermilk
fc2eb66d9f Merge pull request #5976 from smarterclayton/support_resource_builder_on_label
`kubectl label` should support resource builder
2015-03-26 13:21:56 -07:00
Clayton Coleman
68c46e7f52 kubectl label should support resource builder
Allow applying labels to all resources, by existing selector, and
soon allow multiple selection.
2015-03-26 14:01:05 -04:00
Clayton Coleman
581d7cd789 Allow resource.Builder commands to take arguments by type/name
Will allow xarg behavior to fetch resources across multiple types.
Changes 'create', 'get', 'update', 'stop', and 'delete' to output
<resourceType>/<name>.
2015-03-25 20:39:22 -04:00