Commit Graph

132 Commits

Author SHA1 Message Date
Janet Kuo
fe4b16c8aa Fix session ended hint for kubectl run 2016-04-15 17:28:03 -07:00
Janet Kuo
aa2ac9b1d1 -t shorthand for --tty instead of --template 2016-04-15 17:12:42 -07:00
Brendan Burns
be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Jeff Lowdermilk
627615c870 fix typo in kubectl run help string 2016-03-11 10:11:14 -08:00
Brian Grant
1c50f1831c Merge pull request #22849 from soltysh/issue22836
Added api discovery to kubectl run, based on which we decide which generators to use
2016-03-11 09:04:12 -08:00
Maciej Szulik
f27871e60d Added api discovery to kubectl run, based on which we decide which generators to use 2016-03-11 16:59:14 +01:00
Brian Grant
e5748a44d6 Merge pull request #22840 from liggitt/preferred-gvk
Prefer fetched version when determining HPA group version kind
2016-03-11 00:41:39 -08:00
Jordan Liggitt
560b02b3ec Prefer fetched version when determining HPA group version kind 2016-03-11 00:03:38 -05:00
Maciej Szulik
de83631768 Added job/v1 generator to kubectl run 2016-03-10 19:56:57 +01:00
AdoHe
9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Janet Kuo
311385e76c Make deployment the default in kubectl run 2016-02-12 12:29:14 -08:00
Janet Kuo
5088d0e147 Record kubectl commands 2016-02-03 10:19:05 -08:00
feisky
dced44b16d make "image" required for --expose 2016-01-29 17:12:59 +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
Michail Kargakis
71934b7643 kubectl: Validate flag usage against generators
This commit moves the generators into separate buckets and creates
separate calls for each one group. This helps in providing just the
necessary generators to each generator command.

Validation of flags against generators is also added so that flags
that are not meant to be used with a specific generator will result
in error.
2015-12-18 15:09:53 +01:00
feihujiang
9ab06cfa62 Support remove flag for kubectl run command 2015-12-14 16:16:43 +08:00
deads2k
f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
deads2k
8679925847 update RESTMapping API to be properly typed 2015-11-25 14:02:37 -05:00
Janet Kuo
c0c02c95c4 kubectl run to produce deployment and job 2015-11-24 10:21:31 -08:00
feihujiang
4d2333b7d8 Let kubectl run follow rules for -- 2015-11-18 14:46:01 +08:00
Wojciech Tyczynski
d80e0e837c Merge pull request #10707 from kargakis/logs-with-resource-builder
logs: Use resource builder
2015-11-09 16:40:10 +01:00
Janet Kuo
a6a64820d7 Make generation of the apply annotation optional 2015-11-06 15:08:50 -08:00
kargakis
4fdb6d1331 logs: Use resource builder 2015-11-05 14:54:55 +01:00
k8s-merge-robot
3f3918048a Merge pull request #16669 from erictune/fix-run-docstring
Auto commit by PR queue bot
2015-11-03 05:29:29 -08:00
Eric Tune
0bde95f1ce Fix incorrect flag in example. 2015-10-30 15:40:05 -07:00
Jordan Liggitt
b58e62e7d4 Pass runtime.Object to Helper.Create/Replace 2015-10-28 12:43:21 -04:00
Fabiano Franz
312d53d9c9 Expose attachable pod discovery to factory 2015-10-23 17:28:41 -02:00
Jeff Lowdermilk
d4de35e177 Merge pull request #15921 from brendandburns/fix2
Add a --expose flag to kubectl run
2015-10-21 13:17:26 -07:00
Brendan Burns
54fd60727e add a --expose flag to kubectl run 2015-10-20 20:21:09 -07:00
Clayton Coleman
e9a465d635 Make kubectl run attach behave like docker run
Have stdin closed by default, can be left open with --leave-stdin-open.
Add e2e tests for the behavior.
2015-10-16 20:33:51 -04:00
jackgr
ef3f64612e Add calls to set annotation for kubectl apply 2015-10-07 17:15:56 -07:00
k8s-merge-robot
2516086771 Merge pull request #14764 from timstclair/kubectl
Auto commit by PR queue bot
2015-10-01 17:10:10 -07:00
Tim St. Clair
4dc9df91d8 Fix race condition in kubectl run --attach 2015-09-29 15:02:38 -07:00
feihujiang
e31bc89232 Fix minor bugs in kubectl command 2015-09-28 13:58:31 +08:00
Clayton Coleman
c2e90cd154 Support extended pod logging options
Increase the supported controls on pod logging. Add validaiton to pod
log options. Ensure the Kubelet is using a consistent, structured way to
process pod log arguments.

Add ?sinceSeconds=<durationInSeconds>, &sinceTime=<RFC3339>, ?timestamps=<bool>,
?tailLines=<number>, and ?limitBytes=<number>
2015-09-21 15:39:32 -04:00
derekwaynecarr
295b8cdf16 Add requests and limits to kubectl run 2015-09-11 10:57:21 -04:00
Brendan Burns
682c68c2fb Address comments, and fix some bugs in kubectl. 2015-09-09 11:48:04 -07:00
feihujiang
84e94e39cd Support setting env vars in kubectl run 2015-09-08 14:31:29 +08:00
Piotr Szczesniak
7fc1fe2dd9 Merge pull request #13444 from hurf/run_out
Change default output of `run` command
2015-09-04 13:43:00 +02:00
feihujiang
0427711c42 Fixes upper case letters in kubectl examples 2015-09-03 12:00:21 +08:00
hurf
af1d7de874 Change default output of run command
Use simple message instead of print result in `get` form.
2015-09-02 14:11:20 +08:00
Clayton Coleman
32aebc42cc Run should be flexible to type
OpenShift would like to use its own types as generator arguments
2015-08-20 22:35:28 -04:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Brendan Burns
586931fe16 Add optional arguments to kubectl run ... 2015-08-13 09:41:51 -07: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
Brendan Burns
e42d6aa255 Add --restart support to kubectl run 2015-08-07 13:20:09 -07:00
Brendan Burns
9ac50b4980 Add interactive run that combines run and attach. 2015-08-06 20:20:14 -07:00
Mike Danese
17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Eric Tune
2e848ed707 Merge pull request #10585 from caesarxuchao/fix-alias
Add boundary check before accessing os.Args[1]
2015-07-15 15:00:09 -07:00
Chao Xu
48679d21d2 add boundary check before access os.Args 2015-07-09 16:15:42 -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
Kris Rousey
6e83eb2636 Updating docs/ to v1 2015-06-05 14:09:49 -07:00
Anastasis Andronidis
d4a47bdb9e rename run-container to run in kubectl 2015-05-27 19:07:17 +02:00
Chao Xu
013130f150 update the docs for kubectl-run-container to v1beta3 2015-05-18 13:29:24 -07:00
kargakis
c9e79a3c28 Setup generators in factory 2015-05-05 12:00:13 +02:00
Victor Marmol
90de73ac7a Merge pull request #7536 from rjnagal/node
Add --hostport to run-container.
2015-05-04 12:55:12 -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
Rohit Jnagal
9cbfb0c3f9 Add --hostport to run-container.
This helps as a starting point to show a single-machine container.
Its easier to use this as an example to show where host port mapping breaks and move on to
services.
2015-05-01 23:45:03 +00: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
Tim Hockin
c2bacd588d Stop using dockerfile/* images
As per
http://blog.docker.com/2015/03/updates-available-to-popular-repos-update-your-images/
docker has stopped answering dockerfile/redis and dockerfile/nginx.  Fix all
users in our tree.  Sadly this means a lot of published examples are now broken.
2015-04-16 12:20:43 -07:00
deads2k
6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -04:00
Tamer Tas
b39e31d8a3 Remove cmd from kubectl/cmd/factory 2015-03-18 14:23:14 +02:00
Jeff Lowdermilk
a5746c9a0e Fix md generation for kubectl docs
Display usage string, not long help, as code, remove angle brackets from
output (.md interprets as tags and hides).
2015-03-11 16:42:40 -07:00
Jeff Lowdermilk
cd7d78b696 Make kubectl commands return errors and centralize exit handling 2015-03-10 10:19:43 -07:00
Brendan Burns
f505a33998 Differentiate between server error messages and client error messages in kubectl 2015-03-07 11:39:23 +01:00
Eric Paris
d508395828 Change all cobra commands to use the example section
This will output the examples in their own section, rather than as part
of the 'long' synposis.
2015-02-20 16:41:31 -05:00
Mike Danese
a4eca69e6c added previously failing unit test and fix using pkg/util/merge.go instead of mergo to apply patch. 2015-02-17 07:43:21 -08:00
MikeJeffrey
ca1e9f8061 Comments go above the sample line in kubectl docs. 2015-02-12 15:49:25 -08:00
MikeJeffrey
e5459c8802 Clean up kubectl help for auto-gen'd kubectl.md 2015-02-10 12:02:05 -08:00
Jeff Lowdermilk
d46ae5d841 Refactor kubectl/cmd helpers into pkg/kubectl/cmd/util
Allows helpers to be used by config commands.
2015-02-05 09:39:42 -08:00
Brendan Burns
7e48b26ff5 Address comments, fix tests. 2015-01-30 20:51:40 -08:00
Brendan Burns
250b9ccd74 Address comments. Rebase. 2015-01-27 10:23:28 -08:00
Brendan Burns
09166f5252 Add a service generator and a command to easily expose services. 2015-01-27 10:06:08 -08:00
deads2k
dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
bgrant0607
52cd620da8 Merge pull request #3537 from brendandburns/cli
Add inline JSON patching to kubectl update ...
2015-01-15 17:08:51 -08:00
Brendan Burns
e8489264cf Addressed comments. 2015-01-15 16:07:56 -08:00
Brendan Burns
4209bd4888 Add add a utility for merging JSON fragments, and use it in run-container. 2015-01-15 14:44:26 -08:00
Jeff Lowdermlk
e6e6092904 Fix nil dereference in kubectl run-container 2015-01-15 11:39:50 -08:00
Brendan Burns
de886591b5 Add tests for run command and generate. 2015-01-14 07:12:32 -08:00
Brendan Burns
1ce6c27f3d Add an initial run command 2015-01-13 20:00:29 -08:00