Commit Graph

78 Commits

Author SHA1 Message Date
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Michael Rubin
760b04e294 Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline
is prepended to output, which will alter the yaml output.

Here we use dedent to format the code to match the output.

hack/update-generated-docs.sh has been run and the affected files have
been added.

Note: for describe.go we added a period to the end of an output message.
2016-06-26 22:51:14 -07:00
Michail Kargakis
3cbb6b0104 kubectl: move printObjectSpecificMessage in factory 2016-05-28 18:33:58 +02:00
k8s-merge-robot
e543bd6452 Merge pull request #26007 from smarterclayton/watch_opt
Automatic merge from submit-queue

Additional optimizations to the encode/decode paths

Builds on top of #25983 with a number of other optimizations.
2016-05-28 06:27:00 -07:00
Minhan Xia
a1bd33f510 promote sourceRange into service spec 2016-05-26 10:42:30 -07:00
Clayton Coleman
c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Clayton Coleman
fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Brendan Burns
be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Mike Metral
7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
Jordan Liggitt
560b02b3ec Prefer fetched version when determining HPA group version kind 2016-03-11 00:03:38 -05:00
k8s-merge-robot
739285b146 Merge pull request #21265 from stevekuznetsov/skuznets/new-sa
Auto commit by PR queue bot
2016-03-01 01:14:06 -08:00
AdoHe
9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Steve Kuznetsov
e5b696ee43 added 'kubectl create sa' to create serviceaccounts 2016-02-26 10:27:37 -05:00
Paul Morie
51a9c2c9ba Add kubectl create configmap 2016-02-18 21:24:21 -05:00
Janet Kuo
5088d0e147 Record kubectl commands 2016-02-03 10:19:05 -08:00
Clayton Coleman
2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
derekwaynecarr
5e0948586c Add kubectl create [SUBCOMMAND] pattern 2015-12-14 13:43:45 -05:00
Janet Kuo
37f35d9342 Make kubectl apply create resources if not found 2015-11-08 22:47:40 -08:00
Janet Kuo
a6a64820d7 Make generation of the apply annotation optional 2015-11-06 15:08:50 -08:00
Jordan Liggitt
b58e62e7d4 Pass runtime.Object to Helper.Create/Replace 2015-10-28 12:43:21 -04:00
jackgr
ef3f64612e Add calls to set annotation for kubectl apply 2015-10-07 17:15:56 -07:00
Brendan Burns
9ba13ff361 Address comments 2015-09-11 13:55:16 -07:00
Brendan Burns
d9e1a00a14 Add caching for swagger schemas 2015-09-10 21:18:52 -07:00
deads2k
f1b81ff678 bind filenames var instead of looking up 2015-09-01 08:35:57 -04:00
Janet Kuo
5823ef771b Make --validate default on and shows how to turn if off 2015-08-25 03:18:32 -07:00
feihujiang
29dc7f6ec2 Make a change to visitor to allow it to accept an error, like Go's path walker 2015-08-20 10:57:28 +08:00
Peeyush Agarwal
05e069d038 Use bash comments in kubectl examples
Comments in kubectl examples should use bash comments, not Go comments.
So, replaces // by # for example strings.
2015-08-12 19:56:23 +00: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
Brian Grant
5540917094 Merge pull request #11366 from davidopp/doc1
Move docs/services-firewalls.md into docs/user-guide/ and make small
2015-07-16 22:48:13 -07:00
Tim Hockin
f7512d007b Add munger to verify kubectl -f targets, fix docs 2015-07-16 15:39:45 -07:00
David Oppenheimer
fd2c3695e3 Move docs/services-firewalls.md into docs/user-guide/ and make small
wording changes to api.md
2015-07-16 13:21:14 -07:00
Tim Hockin
fe89298c09 Fix load-balancer firewall messages 2015-07-14 21:07:46 -07:00
Kris Rousey
ffa764d60b Unify command line namespace resolution
This change allows the namespace in kubeconfig to be overridden by
specifying the namespace in the spec file. If namespace is explicitly
provided in the command line flags and the spec file has a different
namespace, this will cause an error.
2015-07-01 12:59:17 -07:00
Maxwell Forbes
d90895adfd Merge pull request #10221 from feihujiang/addSourceForErrorFromServerMessage
Add source in “error from server” message when using kubectl
2015-06-25 10:56:46 -07:00
feihujiang
b41b53122a Add source in “error from server” message when using kubectl 2015-06-25 14:20:09 +08:00
Brendan Burns
f0ff1927f1 Fixup port printing. 2015-06-19 15:10:22 -07:00
gong yong sheng
3a598eba0e Use NodePort instead Port, firewalls install firewall. 2015-06-19 14:48:43 -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
Brendan Burns
7f11585972 Fix validation by moving it into the resource builder.
Also always print an error for unknown field.
2015-05-08 14:00:33 -07:00
Filip Grzadkowski
be2b2466f3 Merge pull request #7076 from eparis/bash-5-kubectl-required-flags
annotate required flags for bash_completions
2015-05-04 13:26:11 +02: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
Eric Paris
0620940d26 annotate required flags for bash_completions
some commands require that certain flags be set in order to function.
Annotate those flags so the bash completions will suggest to the user
that they be set.
2015-04-20 18:33:00 -04:00
Eric Paris
de3864a1c2 bash_completions: Generic function for --filename arguments
This generic function adds --filename= arguments to commands, and does
the magic so they get bash completions to find json, yaml, or yml files.
2015-04-14 18:25:52 -04:00
deads2k
6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -04:00
Young
ad3712d07c RunCreate don't need the cmd arg any more 2015-04-07 21:39:48 +08:00
Young
84bfda0587 remove cmd arg
related issue "Remove cmd from kubectl/cmd/factory arguments #4470"
2015-03-27 21:46:17 +08: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