Commit Graph

109 Commits (ce7f003f57f6938c6f513e2880ed23f35f1160db)

Author SHA1 Message Date
Kubernetes Submit Queue f0e5dac1f1 Merge pull request #30247 from ardnaxelarak/28695_suppress_noisy_output
Automatic merge from submit-queue

Make more messages respect --quiet flag

Make following two messages respect `--quiet` in `kubectl run`
- `If you don't see a command prompt, try pressing enter.`
- `Pod "name" deleted`

Ref #28695
2016-08-12 21:34:14 -07:00
Kubernetes Submit Queue 2ab58ea519 Merge pull request #30162 from juanvallejo/jvallejo_err-kube-run-on-invalid-image-value
Automatic merge from submit-queue

return err on `kubectl run --image` with invalid value

When running `kubectl run <configname> --image="Invalid$$%ImageValue%%__"`, a configuration is successfully created with an image name that is not a valid value for an image reference.

This patch validates that the image name is a valid image reference, and returns an error before creating a config if an invalid value is passed.

`$ kubectl run test --image="Invalid__%imagename"`
```
error: Invalid image name "Invalid__%imagename": invalid reference format
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30162)
<!-- Reviewable:end -->
2016-08-12 06:09:26 -07:00
Maciej Szulik 902ecd85fc Remove seconds from scheduled jobs cron format 2016-08-10 11:15:33 +02:00
juanvallejo af37981812 return err on kubectl run --image with invalid value 2016-08-09 15:05:44 -04:00
Kara Alexandra 4c959c0b23 Make more messages respect --quiet flag
- "If you don't see a command prompt, try pressing enter."
- "Pod "name" deleted"

Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-08 14:24:44 -07:00
Maciej Szulik b5c68a9015 ScheduledJob kubectl changes 2016-08-03 17:25:37 +02:00
Andy Goldstein 77b0547b3d Fix Windows terminal handling
Fix some issues with Windows terminal handling with respect to TTYs that came up as part of the
code that adds support for terminal resizing.
2016-07-20 13:37:14 -04:00
k8s-merge-robot 47d06dd9c2 Merge pull request #28606 from dims/fix-issues-19636
Automatic merge from submit-queue

Fix kubectl run to print object on dry run

Originally Authored By tnachen in PR:
https://github.com/kubernetes/kubernetes/pull/25842

Fixes #19636
2016-07-12 21:05:58 -07:00
Janet Kuo 268b93ea75 Add --quiet to hide the 'waiting for pods to be running' message in kubectl run 2016-07-12 11:56:58 -07:00
Davanum Srinivas 8b0868b76d
Fix kubectl run to print object on dry run
Originally Authored By tnachen in PR:
https://github.com/kubernetes/kubernetes/pull/25842

Fixes #19636
2016-07-08 11:00:08 -04:00
k8s-merge-robot 569008809f Merge pull request #28375 from duglin/removeContinue
Automatic merge from submit-queue

Remove unneeded continute

very minor but I noticed and it and it bugged me :-)

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-07-07 11:36:13 -07:00
k8s-merge-robot 2da247ffbc Merge pull request #26977 from joe2far/fix-help-strings
Automatic merge from submit-queue

Make kubectl help strings consistent
2016-07-07 00:12:22 -07:00
Doug Davis 507c3f2802 Remove unneeded continute
very minor but I noticed and it and it bugged me :-)

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-07-01 11:30:43 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 90f47644f6 Merge pull request #28012 from sttts/sttts-kubectl-attach-err-non-existing-ctr
Automatic merge from submit-queue

kubectl attach: error out for non-existing containers

Currently, kubectl attach falls back to the first container which is pretty confusing.

Based on https://github.com/kubernetes/kubernetes/pull/27541.
2016-06-29 10:11:03 -07:00
joe2far 25b4341dc7 Make kubectl help strings consistent 2016-06-29 12:50:24 +01:00
Dr. Stefan Schimanski 0acca44dc1 Error out on non-existing container in kubectl attach 2016-06-28 21:11:29 +02: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
Dr. Stefan Schimanski 65e2e63170 Set AttachOptions.CommandName from kubectl run using corba CommandPath
This sets AttachOptions.CommandName dynamically depending on the corba Command
hierarchy. If the root command is named e.g. "oc" (for the OpenShift cli) this
will result in "oc attach" instead of the static "kubectl attach" before this
patch.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1341450
2016-06-13 17:16:35 +02:00
Janet Kuo 75c3cbcbfb Don't ignore error when Discovery().ServerResources() in kubectl run 2016-06-08 10:34:09 -07:00
Dr. Stefan Schimanski 026804c2be Fix kubectl --attach decription with deprecated --interactive 2016-06-01 13:21:39 +02:00
k8s-merge-robot d957e78a41 Merge pull request #25253 from soltysh/issue24533
Automatic merge from submit-queue

kubectl run --restart=Never creates pods

Fixes #24533.

@bgrant0607 @janetkuo ptal
/fyi @thockin

```release-note
* kubectl run --restart=Never creates pods
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-31 11:44:05 -07:00
Maciej Szulik d76fa8a119 kubectl run --restart=Never creates pods 2016-05-28 07:08:32 +02: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
Janet Kuo 4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Janet Kuo 57c2a28b92 Clarify limit/requests flags in kubectl run 2016-05-06 16:32:43 -07:00
k8s-merge-robot ae5065a2c2 Merge pull request #24365 from janetkuo/remove-t-for-tty
Automatic merge from submit-queue

Add flag -t as shorthand for --tty

`-t` was deprecated in #12813 (Aug. 2015, about 6+ months ago). 

Now remove `--template`'s shorthand `-t` and create a shorthand `-t` for `--tty` in `kubectl run`. 

@kubernetes/kubectl
2016-04-28 00:23:11 -07:00
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