Commit Graph

2160 Commits (9fab05fe59fb4e02deb0f839ae2ae79954bbda4c)

Author SHA1 Message Date
Wojciech Tyczynski 7403564366 Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
Angus Salkeld eec08872c7 Move deployment utilities to there own package 2016-07-08 09:46:56 +02:00
k8s-merge-robot 1c8985160a Merge pull request #28573 from dims/fix-issue-7496-followup
Automatic merge from submit-queue

Follow up to PR 25640 - Cleanup newline and tweak help text

Follow up to PR https://github.com/kubernetes/kubernetes/pull/25640

* Remove redundant newline below Aliases:
* Renaming "Available Commands:" to "Available Sub-commands:"
2016-07-07 20:52:56 -07:00
k8s-merge-robot 5f2460b58c Merge pull request #21240 from thockin/validation_pt8
Automatic merge from submit-queue

Validation: Make validation func return error strings

Part of an ongoing series of validation cleanups.

This centralizes the error strings next to the code that checks the error conditions.  Future commits will refine the messages further and provide more utility validators.

I'm OK if this doesn't go into 1.2, but I am tired of rebasing :)  I suggest commit-by-commit review, which should go pretty quickly.  This was largely mechanical.

<!-- 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/21240)
<!-- Reviewable:end -->
2016-07-07 14:37:11 -07:00
juanvallejo 17a4df2c31 update resource builder error message to be more clear 2016-07-07 16:32:26 -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
Sylwester Brzeczkowski 19434e1b58 24133 fix: --no-headers works with custom columns now 2016-07-07 10:04:09 +02: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
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
Davanum Srinivas e3146456d3
Change Commands to Sub-commands in help 2016-07-06 23:29:49 -04:00
Davanum Srinivas 59142694bf
Remove Extra line after Aliases 2016-07-06 23:28:11 -04: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
Davanum Srinivas 09fee66783
Add custom-columns and custom-template-file to --help text
Fixes #28314
2016-07-06 09:02:50 -04: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
Tim Hockin 766f44f715 Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07: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
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
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
Michal Rostecki d285faaf8a Include petsets in kubectl valid commands
Petsets are already implemented in kubectl, but there were no hints
for that subcommand.

Fixes #25615
2016-06-28 08:07:11 +02: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
k8s-merge-robot a6f6a74a9d Merge pull request #27359 from sttts/sttts-kubectl-exec-not-running
Automatic merge from submit-queue

Add not-running check to kubectl-exec

Different cases:
- pod is started, container terminated: 
```
error: error executing remote command: error executing command in container: container not found ("sleep1")
```
- pod has terminated:
```
error: cannot exec into a container in a completed pod; current phase is Succeeded
```
- container does not exist in pod spec:
```
Error from server: container foo is not valid for pod multi-container
```

Fixes https://github.com/openshift/origin/issues/8472#event-681794952
2016-06-25 21:31:03 -07:00
k8s-merge-robot 84c8158b2a Merge pull request #27263 from sttts/sttts-kubectl-attach-cmdName
Automatic merge from submit-queue

Dynamically derive AttachOptions.CommandName

This PR 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-25 18:40:56 -07:00
k8s-merge-robot 951b591716 Merge pull request #26722 from deads2k/local-patch
Automatic merge from submit-queue

let patch use --local flag like `kubectl set image`

Adds the concept of a `--local` flag to `kubectl patch`.  This flag is similar to `kubectl set image -f --local` because it will use the content of the file as the input to the patch operation instead of using the file content to file resource/name tuples.  

This pull lets you run something like `kubectl create deployment --dry-run -o yaml | kubectl set volume --local -f - -o yaml | kubectl patch --local -f - --patch {} | kubectl create -f -`

As proof that it works, you can run against a local file just to mess around with it, but `--local -f -` is the most likely case.
```
$kubectl patch --local -f pkg/api/validation/testdata/v1/validPod.yaml --patch='{"spec": {"restartPolicy":"Never"}}'
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    name: redis-master
  name: name
spec:
  containers:
  - args:
    - this
    - is
    - an
    - ok
    - command
    image: gcr.io/fake_project/fake_image:fake_tag
    name: master
    resources: {}
  restartPolicy: Never
status: {}
```

This is useful for setting rarely used, but immutable fields from `kubectl create` or `kubectl convert` without dropping to an interactive editor.

Some discussion here: https://github.com/kubernetes/kubernetes/issues/21648#issuecomment-218579977

@smarterclayton @kubernetes/kubectl 
 @eparis @soltysh @stevekuznetsov we've talked about this separately
2016-06-25 10:00:41 -07:00
k8s-merge-robot 81c8fe37e6 Merge pull request #26598 from janetkuo/3rd-party-error-logs
Automatic merge from submit-queue

Add more information when throwing errors in discoverying 3rd party resources

#26425


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-25 09:25:58 -07:00
k8s-merge-robot 99951007ff Merge pull request #26539 from ripcurld00d/fix_json_template_url
Automatic merge from submit-queue

Update the jsonpath template URL

It seems like http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md redirects to http://kubernetes.io/docs/user-guide/jsonpath/.

Therefore, updating to the new URL where is required.

Relate to https://github.com/openshift/origin/pull/9013
2016-06-25 08:17:31 -07:00
k8s-merge-robot 7c355e18a7 Merge pull request #25085 from metral/recursive-edit
Automatic merge from submit-queue

enable recursive processing in kubectl edit

This PR was split out of https://github.com/kubernetes/kubernetes/pull/23673 per @deads2k's suggestion: https://github.com/kubernetes/kubernetes/pull/23673#discussion_r61291178

It makes use of the recursive processing of a directory in `kubectl edit`
2016-06-24 23:59:54 -07:00
Buddha Prakash c3551ae6cd Refactor qos package
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-24 15:36:04 -07:00
k8s-merge-robot ce0227bb8b Merge pull request #27402 from pwittrock/owners
Automatic merge from submit-queue

Remove bgrant from owners since he has plenty to do.

@bgrant0607 FYI

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-24 13:56:59 -07:00
Sylwester Brzeczkowski a558cadedd Fix attach command for InitContainers 2016-06-24 14:35:02 +02:00
Vishnu kannan fc3101f515 remove reference to documentation webpage from kubectl describe nodes output
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-23 16:28:01 -07:00
Dominika Hodovska 59db75f893 kubectl/autoscale: fix tips when validating --max flag
bug 1336632
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1336632
2016-06-22 09:51:15 +02:00
Janet Kuo ee81e5ebfa Retry Pod/RC updates in kubectl rolling-update 2016-06-21 16:08:10 -07:00
k8s-merge-robot 1fd4047961 Merge pull request #27549 from Clarifai/eventorder
Automatic merge from submit-queue

swap FIRSTSEEN/LASTSEEN columns in `kubectl get event -w`

```release-note
Show LASTSEEN, the sorting key, as the first column in `kubectl get event` output
```
Not having LASTSEEN as the first column can confuse users into thinking
that events are not delivered in order.

Fixes #27060
2016-06-21 00:09:53 -07:00
k8s-merge-robot ca76cc0e9f Merge pull request #27566 from metral/clarify-docs
Automatic merge from submit-queue

clarify kubectl recursive flag description

Clarify the description of the recursive flag in `kubectl` so that it's more intuitive to the user

This should make it into v1.3 as the rest of the recursive feature PR's will be available in 1.3
2016-06-20 13:06:40 -07:00
k8s-merge-robot b613908cf2 Merge pull request #27365 from derekwaynecarr/describe_allocatable
Automatic merge from submit-queue

kubectl describe node is allocatable aware

`kubectl describe node` will render node.status.allocatable if present.

in addition, it will report allocated resources relative to node.status.allocatable if present instead of capacity.

old code was confusing if you setup system-reserved and kube-reserved as allocated resource percentages were relative to node capacity and not schedulable amount of resources.

this is a small but valuable usability improvement, so i think it would be good to make 1.3 milestone.

/cc @kubernetes/sig-node @kubernetes/rh-cluster-infra @kubernetes/kubectl @davidopp
2016-06-20 13:06:35 -07:00
k8s-merge-robot 3df228fd76 Merge pull request #27431 from jsafrane/pv-events-print
Automatic merge from submit-queue

'kubectl describe pv' now shows events
2016-06-19 15:31:55 -07:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Mike Metral 6b172657b0 clarify recursive flag description 2016-06-17 08:35:44 -07:00
Rudi Chiarito bf873df1ee swap FIRSTSEEN/LASTSEEN columns in `kubectl get event`
Not having LASTSEEN as the first column can confuse users into thinking
that events are not delivered in order.

Fixes #27060
2016-06-16 14:39:41 -04:00
Dr. Stefan Schimanski 734f05057e Add pod-terminated check to kubectl-exec
Fixes https://github.com/openshift/origin/issues/8472#event-681794952
2016-06-16 19:44:47 +02:00
Phillip Wittrock 0ed3bd63e4 Remove bgrant from pkg/OWNERS and pkg/kubectl/OWNERS since he has plenty to do. 2016-06-16 08:21:27 -07:00
Jan Safranek e1e9a41757 Show events in 'kubectl describe pv' 2016-06-15 14:17:02 +02:00
deads2k ac64404d86 let patch use local file content to mutate 2016-06-14 14:38:00 -04:00
derekwaynecarr 65764c8ed2 kubectl describe node is allocatable aware 2016-06-14 13:06:47 -04:00
Łukasz Oleś 11e1188dbe Show restart count for init containers
Coutner is reset for normal containers.
fixes issue: #26892
2016-06-14 14:35:37 +02:00
k8s-merge-robot 0d02f8c0f6 Merge pull request #26557 from AdoHe/patch_retry
Automatic merge from submit-queue

kubectl apply retry stale resource version

```release-note
kubectl apply: retry applying a patch if a version conflict error is encountered
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

fixes #15493 
@pwittrock I just got my original implementation back, ptal.
2016-06-13 10:13:27 -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
k8s-merge-robot 98f0d22bcc Merge pull request #26975 from ericchiang/kubectl-resource-printer-for-rbac-group
Automatic merge from submit-queue

pkg/kubectl: add resource printers for rbac api group

This PR adds the necessary kubectl printers for the rbac api group which we overlooked in previous PRs.

cc @erictune
2016-06-12 17:13:55 -07:00
Clayton Coleman b2f72e6b1b
resource.Builder should not alter error type from server
The current helpful message loses the error type, which means
resource.Builder consumers can't filter errors or have downstream logic.

If the error is a known type, only mutate the message, not the message
type.
2016-06-11 19:22:54 -04:00
k8s-merge-robot 2ef20b41f6 Merge pull request #26686 from metral/fix-get-output
Automatic merge from submit-queue

fix recursive & non-recursive kubectl get of generic output format

This PR fixes the issues with `kubectl get` in https://github.com/kubernetes/kubernetes/issues/26466

Changes made:
- fix printing when using the generic output format in both non-recursive & recurvise settings to ensure that errors are being shown
- add tests to check printing generic output in a **non-recursive** setting with non-existent pods
- clean up the **recursive** `kubectl get` tests

/cc @janetkuo
2016-06-11 14:26:31 -07:00
Boaz Shuster d6f69c0f22 Update the jsonpath template URL 2016-06-10 12:22:36 +03:00
Piotr Szczesniak 1818b5b3fc Added hpa/v1 generator to kubectl autoscale 2016-06-10 09:26:35 +02:00
k8s-merge-robot f1ccc2f1be Merge pull request #26354 from csrwng/fix_visitor_error
Automatic merge from submit-queue

kubectl: fix URLVisitor error message

The status of a failed fetch will usually include the code, resulting in a duplicate code in the error message:
```
unable to read URL "http://git:8080/ruby-hello-world.git", server reported 401 401 Unauthorized
```

This change rearranges them so at least the message doesn't stutter (and includes the code in case it's not part of the status):
```
unable to read URL "http://git:8080/ruby-hello-world.git", server reported 401 Unauthorized, status code 401
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-09 02:43:27 -07:00
k8s-merge-robot 0b6e0e2b02 Merge pull request #26749 from Clarifai/describe-svc
Automatic merge from submit-queue

AWS: kubectl get service should print hostnames for LB services

Fixes #21526

Also test wide outputs. We only guarantee the first IP to be fully printed
if multiple ingresses are present. For AWS, which has no ingress IPs, but
only hostnames, the ELB hostname will be truncated, unless -o=wide is
specified.
2016-06-09 02:43:23 -07:00
k8s-merge-robot 5a5c490a43 Merge pull request #27057 from janetkuo/kubectl-run-server-discovery
Automatic merge from submit-queue

Don't ignore error when Discovery().ServerResources() in kubectl run

Ref #27014
This doesn't fix the flake directly, but expose the error happened when the flake happens. 

@kubernetes/kubectl @caesarxuchao 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-08 23:49:04 -07:00
AdoHe 69bcdc20ff kubectl apply retry stale resource version 2016-06-09 00:14:17 -04:00
Rudi Chiarito 40f76a95cb AWS: kubectl get service should print hostnames for LoadBalancer services
Fixes #21526

Also test wide outputs. We only guarantee the first IP to be fully printed
if multiple ingresses are present. For AWS, which has no ingress IPs, but
only hostnames, the ELB hostname will be truncated, unless -o=wide is
specified.
2016-06-08 19:29:48 -04:00