Commit Graph

42 Commits (13b12e89408869c5b560a81e95bca33267bdb8e1)

Author SHA1 Message Date
ymqytw 4487cc5e15 switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
Kubernetes Submit Queue 6949b518d6 Merge pull request #54245 from deads2k/cli-03-postraw
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>.

add kubectl create --raw -f

Adds `--raw` to `kubectl create` to match `kubectl get --raw`.  It re-uses the transport, reads the input stream (stdin or a single file for now) and posts directly to the endpoint specified.  This let's you direct data directly at a subresource (as a for instance).  I'd like to see this extended to `kubectl replace` too, so that we have full access to subresources via scripting without having to reproduce the transports.

@kubernetes/sig-cli-pr-reviews 

```release-note
add `--raw` to `kubectl create` to POST using the normal transport
```
2017-10-23 17:16:01 -07:00
David Eads 58f39a15de add kubectl create --raw -f 2017-10-23 12:50:46 -04: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
Jordan Liggitt a82c4481f3
Distinguish between client and unstructuredclient in fake factory 2017-01-26 19:59:16 -05:00
deads2k 2734f8f892 move dynamic and discovery clients 2017-01-26 08:37:06 -05:00
deads2k 502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
Chao Xu fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
ymqytw c641834bb3 support editing before creating resource 2016-10-24 09:56:37 -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
Kris 7511412ca6 Make kubectl create use dynamic clients 2016-08-15 22:07:54 -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
Michail Kargakis 3cbb6b0104 kubectl: move printObjectSpecificMessage in factory 2016-05-28 18:33:58 +02: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
Brendan Burns 4123a61df7 Add the client side bits of kubectl export 2015-12-22 10:41:59 -08:00
Kris eacf65ddce Renaming HTTPClientFunc to CreateHTTPClient 2015-11-11 11:54:58 -08:00
Chao Xu ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07: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
Tim Hockin fe89298c09 Fix load-balancer firewall messages 2015-07-14 21:07:46 -07:00
Maxwell Forbes 060cb43785 Merge pull request #10134 from brendandburns/gongysh2004-nodeport
Fix the warning when you create an externalized service
2015-06-24 13:21:27 -07:00
Chao Xu 59b654c996 fix tests for 22f1b07858 2015-06-22 17:10:09 -07:00
Brendan Burns f0ff1927f1 Fixup port printing. 2015-06-19 15:10:22 -07:00
Brendan Burns 380790a8e2 Add messages to indicate that opening an external firewall may be necessary. 2015-06-04 22:31:52 -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
nikhiljindal 1e323d77bc Updating the guestbook example to v1beta3 2015-04-23 14:34:36 -07:00
deads2k 6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -04: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
Brendan Burns 99267d725c Add validation of args for create. 2015-03-24 11:21:52 -07:00
rsokolowski 635281ebe3 Update guestbook example to use replication controller. 2015-02-24 20:21:13 +01:00
derekwaynecarr 0bd0e12bbc Add support for Namespace as Kind
Add example for using namespaces
2015-02-10 09:50:50 -05:00
Clayton Coleman 52c6c60b15 Use name from server when displaying create/update
Allows generated names from files to be displayed so users can
interact with them.
2015-02-08 21:40:47 -05:00
Tim Hockin a480794efc Tighten validation of Name and Namespace 2015-01-27 17:04:59 -05:00
deads2k dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
Clayton Coleman bc86b31a8b Remove createall now that create supports directories and sources 2015-01-09 13:30:31 -05:00
Clayton Coleman d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -05:00