Commit Graph

2095 Commits (ec6181d5d3cae2238d485ee75332ab9c09b619d9)

Author SHA1 Message Date
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
k8s-merge-robot 8741217179 Merge pull request #28547 from elyscape/completion-docs
Automatic merge from submit-queue

Reformat kubectl completion example text
2016-07-06 23:37:06 -07:00
k8s-merge-robot f3d0d147eb Merge pull request #28305 from jlowdermilk/kubectl-convert-noise
Automatic merge from submit-queue

kubectl convert --local prints info message to stderr

fix #28298
2016-07-06 23:36:53 -07:00
k8s-merge-robot 5fe54ac9ef Merge pull request #25640 from dims/fix-issue-7496
Automatic merge from submit-queue

kubectl should print usage at the bottom

Override the Usage: output using SetUsageTemplate. Just moved
the strings in the template to make sure we print Usage: at
the bottom of the output and not at the top.

Fixes issue #7496
2016-07-06 20:19:18 -07:00
Eli Young f2f80a097d Reformat kubectl completion example text
This makes the description wrap properly in 80-character terminals.
2016-07-06 13:18:33 -07:00
k8s-merge-robot c0579af684 Merge pull request #27844 from hodovska/1336632-hpa_flag_tips
Automatic merge from submit-queue

kubectl/autoscale: fix tips when validating --max flag

While autoscaling, it was not clear what was the reason of failed --max flag validation.
This fix divides reasons to:
- value not provided or too low
- value of max is lower than value of min

bug 1336632
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1336632
2016-07-06 08:40:14 -07:00
k8s-merge-robot 58dc3ba31d Merge pull request #28217 from kargakis/simplify-rollbacker-interface
Automatic merge from submit-queue

kubectl: simplify Rollbacker interface

@kubernetes/kubectl
2016-07-06 05:23:41 -07:00
Davanum Srinivas 91f16364b8
kubectl should print usage at the bottom
Override the Usage: output using SetUsageTemplate. Just moved
the strings in the template to make sure we print Usage: at
the bottom of the output and not at the top.

Fixes issue 7496
2016-07-05 10:08:51 -04:00
Angus Salkeld e0ce987f4e Add command "kubectl config get-contexts"
Note: Context is not a runtime object (doesn't have Kind and Version) so
      we can't use the resource_printer
2016-07-05 11:24:00 +02:00
k8s-merge-robot 2f9feef9a6 Merge pull request #27048 from kargakis/ignore-only-409-in-scaler
Automatic merge from submit-queue

kubectl: ignore only update conflicts in the scaler

@kubernetes/kubectl is there any reason to retry any other errors?
2016-07-02 21:28:37 -07:00
Tim Hockin 189d4a5159 Make CIdentifier return error strings 2016-07-02 17:32:05 -07:00
k8s-merge-robot 3166f9316f Merge pull request #28111 from mfojtik/min-ready-seconds
Automatic merge from submit-queue

Add MinReadySeconds to rolling updater

Add MinReadySeconds support to RollingUpdater that allows to specify the number of seconds to wait on top of the pod is "ready" because its readiness probe passed.
2016-07-01 19:21:16 -07:00
k8s-merge-robot e9dc42d9f7 Merge pull request #27987 from vishh/23778
Automatic merge from submit-queue

Remove reference to documentation webpage from kubectl describe nodes output

Fixes #23778
2016-07-01 17:28:58 -07:00
k8s-merge-robot 739e3dd1b1 Merge pull request #26237 from duglin/UseConstant
Automatic merge from submit-queue

Use `CreatedByAnnotation` constant

A nit but didn't want the strings to get out of sync.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-07-01 16:55:39 -07:00
k8s-merge-robot fe07ca6c86 Merge pull request #27379 from juanvallejo/jvallejo_kube-get-all-show-kind-in-headers
Automatic merge from submit-queue

Update "kubectl get all" to display resource type as part of name

fixes #23838
release-note-none

When running "kubectl get all", or printing any output with mixed resource kinds, an additional column is added to the output with each resource's kind:

`kubectl get all --all-namespaces`
```
NAMESPACE     NAME                         DESIRED          CURRENT       AGE
default       rc/docker-registry-1         1                1             23h
testproject   rc/node-1                    0                0             2d
NAMESPACE     NAME                         CLUSTER-IP       EXTERNAL-IP   PORT(S)                 AGE
default       svc/docker-registry          172.30.36.42     <none>        5000/TCP                23h
default       svc/kubernetes               172.30.0.1       <none>        443/TCP,53/UDP,53/TCP   7d
testproject   svc/ruby-ex                  172.30.187.128   <none>        8080/TCP                6d
NAMESPACE     NAME                         READY            STATUS        RESTARTS                AGE
default       po/docker-registry-1-cpf8o   1/1              Running       1                       23h
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-01 14:15:05 -07:00
k8s-merge-robot 1e33d117fe Merge pull request #28294 from ncdc/return-error-for-kubectl-get-singluar
Automatic merge from submit-queue

kubectl: don't display an empty list when trying to get a single resource that isn't found

Return immediately when attempting to get a singular resource that isn't found, so that we avoid
printing out a List if the output format is something like json or yaml.

Before:

```
$ kubectl get pod/foo -o yaml
apiVersion: v1
items: []
kind: List
metadata: {}
pods "foo" not found
```

After:

```
$ kubectl get pod/foo -o yaml
pods "foo" not found
```

Fixes #28243 

@kubernetes/kubectl @kubernetes/rh-ux @smarterclayton @liggitt @deads2k @metral
2016-07-01 13:40:45 -07:00
juanvallejo 7df60d6b64 display resource type as part of its name 2016-07-01 12:58:02 -04:00
k8s-merge-robot f549570e5d Merge pull request #28110 from mfojtik/describe-volume-mounts
Automatic merge from submit-queue

Describe container volume mounts

This patch will list the volume mounts defined for the container in `kubectl describe`:

```console
[root@localhost origin]# kubectl describe pods/ruby-ex-3-ehchv
Name:			ruby-ex-3-ehchv
Namespace:		test
Security Policy:	restricted
Node:			localhost/10.0.2.15
Start Time:		Mon, 27 Jun 2016 11:15:19 +0000
Labels:			app=ruby-ex
			deployment=ruby-ex-3
			deploymentconfig=ruby-ex
Status:			Running
IP:			172.17.0.3
Controllers:		ReplicationController/ruby-ex-3
Containers:
  ruby-ex:
    Container ID:	docker://75869f5dd5da39025ebfcf4cb970004d9cc99ee2f95524732f9102254b289b1e
    Image:		172.30.159.185:5000/test/ruby-ex@sha256:0faa1fcca255a269378a4db51b8eef2ae67312de8b21b033c46fe0ff414efaea
    Image ID:		docker://052fe9b4b929cc883fcbbf1e223373d2fbe8bdf407170210ee29a94c33b40cd3
    Port:		8080/TCP
    QoS Tier:
      cpu:		BestEffort
      memory:		BestEffort
    State:		Running
      Started:		Mon, 27 Jun 2016 11:15:20 +0000
    Ready:		True
    Restart Count:	0
    Volume Mounts:
      volume-eckcb:		/test
      default-token-uffs0:	/var/run/secrets/kubernetes.io/serviceaccount
    Environment Variables:	<none>
```
2016-06-30 17:15:05 -07:00
k8s-merge-robot 23e7b6653f Merge pull request #27049 from andreykurilin/kubectl_help
Automatic merge from submit-queue

Implement custom help command for kubectl

```release-note
* kubectl help now provides "Did you mean this?" suggestions for typo/invalid command names.
```

Custom implementation of help command allows to print `Did you mean this?` with
suggestions, which is missed in embed help command from github.com/spf13/cobra

Also, it can be extended with different search features. At this patch, help
command searches query in short descriptions of commands in case of mismatch
with commands names.

fixes #25234
2016-06-30 16:32:16 -07:00
Andrey Kurilin 48d47b1027 Implement custom help command for kubectl
Own implemenation of help command allows to print `Did you mean this?` with
suggestions, which is missed in embed help command from github.com/spf13/cobra

Also, it can be extended with different search features. At this patch, help
command search query in short descriptions of commands in case of mismatch
with commands names.

fixes #25234
2016-07-01 00:35:56 +03:00
Jeff Lowdermilk 67cfd34354 kubectl convert --local prints info message to stderr 2016-06-30 13:20:38 -07:00
Doug Davis 930332751b Use `CreatedByAnnotation` contant
A nit but didn't want the strings to get out of sync.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-06-30 10:12:26 -07:00
Andy Goldstein 67d929a3d2 Return immediately for singular get on error
Return immediately when attempting to get a singular resource that isn't found, so that we avoid
printing out a List if the output format is something like json or yaml.

Before:

```
$ kubectl get pod/foo -o yaml
apiVersion: v1
items: []
kind: List
metadata: {}
pods "foo" not found
```

After:

```
$ kubectl get pod/foo -o yaml
pods "foo" not found
```
2016-06-30 12:28:51 -04:00
Michal Fojtik 7ea28e42c0 Add MinReadySeconds to rolling updater 2016-06-30 13:13:08 +02:00
Michal Fojtik 7ba1e59d84 Describe container volume mounts 2016-06-30 11:01:10 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 3814809f07 Merge pull request #25736 from andreykurilin/diagram_kubectl_drain
Automatic merge from submit-queue

Add link to diagram of `kubectl drain`
2016-06-29 11:28:21 -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
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
Andrey Kurilin 21b218ce4f Add link to diagram of `kubectl drain`
issue kubernetes/kubernetes.github.io#501
2016-06-29 19:10:01 +03:00
k8s-merge-robot 084b598f4d Merge pull request #25876 from dshulyak/patch_change
Automatic merge from submit-queue

Use strategic patch to replace changeCause in patch command

This is partial rework of 11da9a7638
StrategicPatch will be used to update changeCause but failure wont affect command result

fixes: #24858
2016-06-29 08:34:50 -07:00
k8s-merge-robot 7f3da674f7 Merge pull request #26680 from olegshaldybin/fake-clientset-registry
Automatic merge from submit-queue

Track object modifications in fake clientset

Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-29 06:04:33 -07:00
Dmitry Shulyak d81f7a0f22 Use strategic patch to replace changeCause in patch command 2016-06-29 15:20:38 +03:00
joe2far 25b4341dc7 Make kubectl help strings consistent 2016-06-29 12:50:24 +01:00
Michail Kargakis 2451df4e6c kubectl: simplify Rollbacker interface 2016-06-29 13:30:00 +02:00
k8s-merge-robot de0c033570 Merge pull request #27358 from lukaszo/restarts
Automatic merge from submit-queue

Show restart count for init containers

Coutner is reset for normal containers.
fixes issue: #26892
2016-06-29 03:22:10 -07:00
k8s-merge-robot 1a1a4709b9 Merge pull request #28093 from dubstack/dubstack-refactor-qos2
Automatic merge from submit-queue

[Refactor] Make QoS naming consistent across the codebase

@derekwaynecarr @vishh PTAL. Can one of you please attach a LGTM.
2016-06-29 02:36:22 -07:00
nikhiljindal 88b10b1dc0 Removing unneeded fields from Cluster API object 2016-06-28 17:12:57 -07:00
k8s-merge-robot 70daa166c2 Merge pull request #23830 from sttts/sttts-bash-completion-override-flags
Automatic merge from submit-queue

Add awareness of more override flags in bash-completion

Add awareness during completion for
- `--kubeconfig`
- `--cluster`
- `--user`
- `--context`
- `--server`

TODO:
- [ ] ~~add completion for the upper flags themselves~~ (out of scope)

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/23830)
<!-- Reviewable:end -->
2016-06-28 13:59:13 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
k8s-merge-robot 13bb931b60 Merge pull request #26761 from matchstick/dedent
Automatic merge from submit-queue

Dedent

Adding the dedent package and then applying it to the kubectl help commands. Also updating the documentation to reflect the use of dedent.
2016-06-28 12:50:59 -07:00
Dr. Stefan Schimanski 0acca44dc1 Error out on non-existing container in kubectl attach 2016-06-28 21:11:29 +02:00
George Tankersley 34506faf97 kubectl: add certificates group 2016-06-28 12:05:40 -07:00
Dr. Stefan Schimanski e78d7749a5 Add awareness of more override flags in bash-completion 2016-06-28 20:56:36 +02:00
Oleg Shaldybin 3b15d5be19 Use correct namespace in unit tests that use fake clientset
Fake clientset no longer needs to be prepopulated with records: keeping
them in leads to the name conflict on creates. Also, since fake
clientset now respects namespaces, we need to correctly populate them.
2016-06-28 11:26:34 -07:00
k8s-merge-robot e32b871637 Merge pull request #26771 from kargakis/use-pod-namespacer
Automatic merge from submit-queue

kubectl: fix sort logic for logs

@kubernetes/kubectl
2016-06-27 21:33:59 -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
Buddha Prakash 4acb64f8bd Make Qos naming consistent across the codebase 2016-06-26 16:19:47 -07:00
k8s-merge-robot d64333419c Merge pull request #27749 from dubstack/dubstack-refactor-qos
Automatic merge from submit-queue

[Refactor] QOS to have QOS Class type for QoS classes

This PR adds a QOSClass type and initializes QOSclass constants for the three QoS classes.
It would be good to use this in all future QOS related features. 
This would be good to have for the (Pod level cgroups isolation proposal)[https://github.com/kubernetes/kubernetes/pull/26751] that i am working on aswell.
@vishh PTAL
 
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 06:23:23 -07:00
k8s-merge-robot 7fbf4ac625 Merge pull request #27541 from gitfred/attach-init-con
Automatic merge from submit-queue

Fix attach command for InitContainers

Added InitContainers to the things that GetContainer in attach.go has to look for to find a container to attach. Also test case added.

fixes #27540
2016-06-26 00:04:49 -07:00