Commit Graph

2180 Commits (c19a65c0c6c6d72180a1e28a7e49e0f866b881c3)

Author SHA1 Message Date
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
Matt Liggett d09af4a1d6 Stop 'drain' deleting pods with local storage.
Unless forced with --delete-local-data.  Also a refactoring of the
kubectl drain logic that selects/rejects pods and produces error/warning
messages.
2016-06-08 14:59:03 -07:00
Janet Kuo 75c3cbcbfb Don't ignore error when Discovery().ServerResources() in kubectl run 2016-06-08 10:34:09 -07:00
Michail Kargakis c7140b3749 kubectl: return more meaningful timeout errors 2016-06-08 18:03:49 +02:00
Michail Kargakis a74f700b63 kubectl: ignore only update conflicts in the scaler 2016-06-08 18:03:49 +02:00
Eric Chiang acfac5aff8 pkg/kubectl: add resource printers for rbac api group 2016-06-07 15:26:57 -07:00
Michail Kargakis 886014b1a3 kubectl: fix sort logic for logs
Use a separate sorting algorithm for kubectl logs that sorts from older
to newer instead of the other way that ActivePods is doing.
2016-06-07 10:52:42 +02:00
k8s-merge-robot 5c41b93d8b Merge pull request #26719 from pwittrock/kubectl-owners
Automatic merge from submit-queue

Add pwittrock to the kubectl OWNERS file



[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-06 13:46:13 -07:00
AdoHe 9d28bab847 make kubectl get ingress output more consistency 2016-06-04 22:43:51 -04:00
k8s-merge-robot 421c16addd Merge pull request #25894 from brendandburns/thirdparty-watch
Automatic merge from submit-queue

Fix third party

Fixes https://github.com/kubernetes/kubernetes/issues/25421
Fixes https://github.com/kubernetes/kubernetes/issues/25422

@AdoHe @sjenning @caesarxuchao @lavalamp 

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 15:42:41 -07:00
k8s-merge-robot 9bf1ce42f8 Merge pull request #26843 from AdoHe/describe_ingress
Automatic merge from submit-queue

update ingress describe output

refer #26684 for more detail. @bprashanth ptal.
2016-06-04 13:27:46 -07:00
k8s-merge-robot 95e2535682 Merge pull request #26793 from fabianofranz/expose_show_labels_in_printers
Automatic merge from submit-queue

Expose printer utils that append labels

So that it can be reused downstream. @smarterclayton 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 09:59:39 -07:00
k8s-merge-robot 22d405477b Merge pull request #26568 from derekwaynecarr/kubectl_qos
Automatic merge from submit-queue

Update kubectl describe pod to use pod level qos

Fixes https://github.com/kubernetes/kubernetes/issues/26374

/cc @vishh
2016-06-04 02:40:47 -07:00
AdoHe ab743708fe update ingress describe output 2016-06-04 04:58:37 -04:00
derekwaynecarr 89ff3b2530 Update kubectl describe pod to use pod level qos 2016-06-03 15:32:32 -04:00
Fabiano Franz 8f62a196fd Expose print utils to append labels 2016-06-03 15:00:50 -03:00
k8s-merge-robot 525140a278 Merge pull request #26693 from AdoHe/init_containers
Automatic merge from submit-queue

exec support init containers

Partially fixes #25818 
@smarterclayton ptal.
2016-06-03 10:13:49 -07:00
AdoHe 1cfcb24f37 exec support init container 2016-06-03 02:05:15 -04:00
Mike Metral 4409eed57f fix recursive & non-recursive kubectl get of generic output format 2016-06-02 21:46:15 -07:00
Brendan Burns 328a8392b1 Fix third party 2016-06-02 10:24:14 -07:00
Phillip Wittrock 198c95d3d7 Add pwittrock to the kubectl OWNERS file 2016-06-02 09:21:25 -07:00
k8s-merge-robot cae939b81c Merge pull request #26654 from janetkuo/e2e-deployment-list-rs
Automatic merge from submit-queue

List RSes once when getting old/new RSes in deployment e2e tests

Ref #26509 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-02 08:54:36 -07:00
k8s-merge-robot 8c66ffbddc Merge pull request #26581 from caesarxuchao/continue-25746
Automatic merge from submit-queue

fix kubectl patch example

Based on https://github.com/kubernetes/kubernetes/pull/25746, fix the kubectl example.

cc @tobstarr
2016-06-02 07:48:07 -07:00
Janet Kuo 2ced966cd5 List RSes once when getting old/new RSes in deployment e2e tests 2016-06-01 14:19:35 -07:00
Janet Kuo 4615d1e24c Add more information when throwing errors in discoverying 3rd party resources 2016-06-01 13:18:50 -07:00
Dr. Stefan Schimanski 026804c2be Fix kubectl --attach decription with deprecated --interactive 2016-06-01 13:21:39 +02:00
k8s-merge-robot 0a6a52b19d Merge pull request #26597 from caesarxuchao/fix-26425
Automatic merge from submit-queue

retry GetThirdPartyGroupVersions

GetThirdPartyGroupVersions() may return a "NotFound" error if a thirdparty group is deleted in the interim between the group-discovery and the resource-discovery. This is causing e2e flakes in all tests that run kubectl, because test/e2e/thirdparty.go is creating/deleting thirdparty groups.

Fix #26425

The e2e flakes will have the following pattern:
1. the test is calling kubectl
2. error message is `Error from server: the server could not find the requested resource`
3. in the apiserver log, you should see `GET /apis/company.com/v1: (518.944µs) 404 [[kubectl/v1.3.0 (linux/amd64) kubernetes/ae28564] 104.154.110.118:46043]`

For detail see [here](https://github.com/kubernetes/kubernetes/issues/26425#issuecomment-222844523)

cc @janetkuo @brendanburns
2016-06-01 00:02:43 -07:00
Chao Xu 7cea7ccd8d retry GetThirdPartyGroupVersions 2016-05-31 17:14:24 -07:00
Chao Xu 216649b822 fix kubectl patch example 2016-05-31 11:45:12 -07: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
k8s-merge-robot ae1fb82cfc Merge pull request #26073 from piosz/remove-metrics-group
Automatic merge from submit-queue

Removed metrics api group

```release-note
Removed metrics api group
```
The group is empty and unused. Kubelet Metrics API is defined in Kubelet code. Master Metrics API is defined in Heapster. Removing to avoid the confusion.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-31 03:50:24 -07:00
k8s-merge-robot c805303644 Merge pull request #26162 from jszczepkowski/kubectl-fix2
Automatic merge from submit-queue

Fixed check in kubectl autoscale.

```release-note
Fixed check in kubectl autoscale: cpu consumption can be higher than 100%.
```

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

Fixed check in kubectl autoscale: cpu consumption can be higher than 100%. Fixes #25815.
2016-05-31 03:00:05 -07:00
Michail Kargakis 476208dec6 kubectl: make --container-port actually work for expose
Even if it was recently deprecated, it should work as expected.
2016-05-31 10:55:49 +02:00
Piotr Szczesniak 22dc21d703 Removed metrics api group 2016-05-31 09:48:39 +02:00
k8s-merge-robot 6a234a2cc2 Merge pull request #24882 from brendandburns/3rdparty
Automatic merge from submit-queue

Add support for 3rd party objects to kubectl label

Fixes https://github.com/kubernetes/kubernetes/issues/24583

@kubernetes/rh-ux
2016-05-30 07:24:51 -07:00
k8s-merge-robot e531a7784e Merge pull request #26242 from metral/refactor-get
Automatic merge from submit-queue

fix recursive get for proper err display

- refactor code to use `Infos()` instead
- fixes https://github.com/kubernetes/kubernetes/issues/26241
2016-05-30 05:04:04 -07:00
Dr. Stefan Schimanski a79a420fde Move shell completion generation into 'kubectl completion' command 2016-05-30 07:23:36 +02:00
k8s-merge-robot 63931d39a3 Merge pull request #26349 from kargakis/fix-reaper-not-found-error
Automatic merge from submit-queue

kubectl: cast scale errors to actual errors when deleting

Fixes some of the deployment reaper timeouts in e2e

@kubernetes/deployment @soltysh
2016-05-29 17:29:30 -07:00
k8s-merge-robot 72479b82e0 Merge pull request #26019 from gyuho/kubectl_slice_append
Automatic merge from submit-queue

pkg/kubectl: preallocate slice
2016-05-29 15:00:15 -07:00
k8s-merge-robot 10b271c6de Merge pull request #26078 from mfojtik/fix-nil-annnotations
Automatic merge from submit-queue

Fix panic when the namespace flag is not present

We don't set the namespace in OpenShift, so we need to check if the namespace flag is present.
2016-05-29 10:32:33 -07:00
Gyu-Ho Lee a14a288c3f pkg/kubectl: preallocate slice
To avoid slice growth with append operations.
2016-05-29 02:09:39 -07:00
k8s-merge-robot 7813e90026 Merge pull request #25802 from dshulyak/sort_history
Automatic merge from submit-queue

Sort revisions in rollout history as integers

Previously keys were sorted as strings, thus it was possible to see such order as 1, 10, 2, 3, 4, 5.

fixes: #25788
2016-05-28 22:56:31 -07:00
k8s-merge-robot 9e31175795 Merge pull request #26161 from kargakis/move-print-method-in-the-factory
Automatic merge from submit-queue

kubectl: move printObjectSpecificMessage in factory

@smarterclayton @kubernetes/kubectl PTAL
2016-05-28 15:15:59 -07:00
k8s-merge-robot 03fc51f74f Merge pull request #26046 from timoreimann/stabilize-map-order-in-kubectl-describe
Automatic merge from submit-queue

Stabilize map order in kubectl describe

Refs #25251.

Add `SortedResourceNames()` methods to map type aliases in order to achieve stable output order for `kubectl` descriptors.

This affects QoS classes, resource limits, and resource requests.

A few remarks:

1. I couldn't find map usages for described fields other than the ones mentioned above. Then again, I failed to identify those programmatically/systematically. Pointers given, I'd be happy to cover any gaps within this PR or along additional ones.
1. It's somewhat difficult to deterministically test a function that brings reliable ordering to Go maps due to its randomizing nature. None of the possibilities I came up with (rely a "probabilistic testing" against repeatedly created maps, add complexity through additional interfaces) seemed very appealing to me, so I went with testing my `sort.Interface` implementation and the changed logic in `kubectl.describeContainers()`.
1. It's apparently not possible to implement a single function that sorts any map's keys generically in Go without producing lots of boilerplate: a `map[<key type>]interface{}` is different from any other map type and thus requires explicit iteration on the caller site to convert back and forth. Unfortunately, this makes it hard to completely avoid code/test duplication.

Please let me know what you think.
2016-05-28 10:49:57 -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
k8s-merge-robot a550cf16b9 Merge pull request #25826 from freehan/svcsourcerange
Automatic merge from submit-queue

promote sourceRange into service spec

@thockin  one more for your pile

I will add docs at `http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md`

cc: @justinsb 

Fixes: #20392
2016-05-28 02:20:13 -07:00
Maciej Szulik d76fa8a119 kubectl run --restart=Never creates pods 2016-05-28 07:08:32 +02:00
Minhan Xia a1bd33f510 promote sourceRange into service spec 2016-05-26 10:42:30 -07:00
Cesar Wong 0800ed834c Fix URLVisitor error message 2016-05-26 09:20:42 -04:00
Michail Kargakis 748c71f3eb kubectl: cast scale errors to actual errors when deleting 2016-05-26 10:33:52 +02:00
Timo Reimann 32aa740fd3 Show resources in pod descriptions by sorted names.
Includes container and QoS resources.
2016-05-25 23:51:37 +02:00
Eric Chiang 323e804f39 add rbac for tests and kubectl 2016-05-25 14:25:56 -07:00
k8s-merge-robot 83c78fdcaa Merge pull request #24179 from aveshagarwal/master-downward-api-resources-limits-requests-implementation
Automatic merge from submit-queue

Downward API implementation for resources limits and requests

This is an implementation of Downward API for resources limits and requests, and it works with environment variables and volume plugin.

This is based on proposal https://github.com/kubernetes/kubernetes/pull/24051. This implementation follows API with magic keys approach as discussed in the proposal.

@kubernetes/rh-cluster-infra

<!-- 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/24179)
<!-- Reviewable:end -->
2016-05-25 03:38:49 -07:00
Mike Metral 950612eb5f fix recursive get for proper err display 2016-05-24 20:05:07 -07:00
k8s-merge-robot 50524c78a1 Merge pull request #20672 from brendandburns/dump
Automatic merge from submit-queue

Add a 'kubectl clusterinfo dump' option

Ref: #3500 

@bgrant0607 @smarterclayton @jszczepkowski 

Usage:
```
  # Dump current cluster state to stdout
  kubectl clusterinfo dump
  
  # Dump current cluster state to /tmp
  kubectl clusterinfo dump --output-directory=/tmp
  
  # Dump all namespaces to stdout
  kubectl clusterinfo dump --all-namespaces
  
  # Dump a set of namespaces to /tmp
  kubectl clusterinfo dump --namespaces default,kube-system --output-directory=/tmp
```

<!-- 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/20672)
<!-- Reviewable:end -->
2016-05-24 14:24:17 -07:00
Avesh Agarwal 1931931494 Downward API implementation for resources limits and requests 2016-05-24 12:22:35 -04:00
Jerzy Szczepkowski 47a5c17aba Fixed check in kubectl autoscale.
Fixed check in kubectl autoscale: cpu consumption can be higher than 100%. Fixes #25815.
2016-05-24 14:56:25 +02:00
Dmitry Shulyak 4a60d3ce60 Sort revisions in rollout history as integers
Previously keys were sorted as strings, thus it was possible
to see such order as 1, 10, 2, 3, 4, 5.

Ints64 helper implemented in util/slice module to sort []int64
2016-05-24 10:04:05 +02:00
Brendan Burns dac09311b8 Add support for labelling 3rd party objects 2016-05-23 13:13:35 -07:00
Michal Fojtik f79998a9b1 Fix panic when the namespace flag is not present 2016-05-23 16:41:31 +02:00
k8s-merge-robot a8ba289003 Merge pull request #25617 from smarterclayton/manage_deploy_logs
Automatic merge from submit-queue

Rolling updater should allow progress to be logged / detected
2016-05-22 23:45:24 -07:00
k8s-merge-robot 88766e8a68 Merge pull request #25600 from janetkuo/sort-by-timestamp
Automatic merge from submit-queue

Support sort-by timestamp in kubectl get

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
```

**Before:**
```console
$ kubectl get svc --sort-by='{.metadata.creationTimestamp}'
proto: no encoder for TypeMeta unversioned.TypeMeta [GetProperties]
proto: tag has too few fields: "-"
proto: no coders for struct *reflect.rtype
proto: no encoder for sec int64 [GetProperties]
proto: no encoder for nsec int32 [GetProperties]
proto: no encoder for loc *time.Location [GetProperties]
proto: no encoder for Time time.Time [GetProperties]
proto: no coders for intstr.Type
proto: no encoder for Type intstr.Type [GetProperties]
F0513 16:46:49.499894   29562 sorting_printer.go:182] Field {.metadata.creationTimestamp} in TypeMeta:<kind:"Service" apiVersion:"v1" > metadata:<name:"kubernetes" generateName:"" namespace:"default" selfLink:"/api/v1/namespaces/default/services/kubernetes" uid:"b88b4739-1964-11e6-9ac3-64510658e388" resourceVersion:"8" generation:0 creationTimestamp:<2016-05-13T16:45:06-07:00> labels:<key:"component" value:"apiserver" > labels:<key:"provider" value:"kubernetes" > > spec:<ports:<name:"https" protocol:"TCP" port:443 targetPort:<type:0 intVal:443 strVal:"" > nodePort:0 > clusterIP:"10.0.0.1" type:"ClusterIP" sessionAffinity:"ClientIP" loadBalancerIP:"" > status:<loadBalancer:<> >  is an unsortable type: struct, err: unsortable type: struct
```

**After:**
```console
$ kubectl get svc --sort-by='{.metadata.creationTimestamp}'
NAME         CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   10.0.0.1     <none>        443/TCP   48s
frontend     10.0.0.108   <none>        80/TCP    10s
```
@kubernetes/kubectl 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-22 22:51:34 -07:00
Mike Metral 4913481b05 enable recursive processing in kubectl edit 2016-05-22 09:49:11 -07:00
k8s-merge-robot 39f0c6ba25 Merge pull request #24719 from bprashanth/kubectl_tls
Automatic merge from submit-queue

Add a kubectl create secret tls command

A somewhat hasty implementation that enables progress along: https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-177409516, https://github.com/kubernetes/kubernetes/issues/24669, https://github.com/kubernetes/kubernetes/issues/20176#issuecomment-198142836 if associated parties have spare cycles. @kubernetes/kubectl

<!-- 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/24719)
<!-- Reviewable:end -->
2016-05-22 09:40:42 -07:00
k8s-merge-robot 6936b9ff21 Merge pull request #20918 from deads2k/fix-list-edit
Automatic merge from submit-queue

fix edit on list

Fixes https://github.com/kubernetes/kubernetes/issues/20519

This reverts the implementation that removed list editing capability, but leaves its tests intact.  This allows edits of lists to work, while still allowing mutation of the annotations.  It does this by walking each item and building per item patches.

The current implementation will do funny things if you delete entire list entries.  A followup could be written to locate the correct list item by name.  Right now, it just rejects the patch because its trying to change an immutable field.

@janetkuo @kubernetes/kubectl @kargakis
2016-05-22 07:12:18 -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
k8s-merge-robot 4d69e2c26a Merge pull request #25475 from soltysh/scheduledjob_client
Automatic merge from submit-queue

ScheduledJob client 

@erictune SheduledJob part 2, based on #24970 so first two commits doesn't count. 
This is still WIP, but it's here so you know :)

```release-note
Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-21 14:10:41 -07:00
k8s-merge-robot d06fe0caf7 Merge pull request #25638 from caseydavenport/cd-network-policy-api
Automatic merge from submit-queue

Add NetworkPolicy API Resource

API implementation of https://github.com/kubernetes/kubernetes/pull/24154

Still to do:
- [x] Get it working (See comments)
- [x] Make sure user-facing comments are correct.
- [x] Update naming in response to #24154
- [x] kubectl / client support
- [x] Release note.

```release-note
Implement NetworkPolicy v1beta1 API object / client support.
```

Next Steps:
- UTs in separate PR.
- e2e test in separate PR.
- make `Ports` + `From` pointers to slices (TODOs in code - to be done when auto-gen is fixed)

CC @thockin 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-21 08:51:28 -07:00
Maciej Szulik 6510eb54d8 ScheduledJob client 2016-05-21 15:48:40 +02:00
k8s-merge-robot 2c471bce4e Merge pull request #25509 from janetkuo/kubectl-set-image
Automatic merge from submit-queue

Add 'kubectl set image'

```release-note
Add "kubectl set image" for easier updating container images (for pods or resources with pod templates). 
```

**Usage:**
```
kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N
```
**Example:**
```console 
# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'.
$ kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1

# Update all deployments' nginx container's image to 'nginx:1.9.1'
$ kubectl set image deployments nginx=nginx:1.9.1 --all

# Update image of all containers of daemonset abc to 'nginx:1.9.1'
$ kubectl set image daemonset abc *=nginx:1.9.1

# Print result (in yaml format) of updating nginx container image from local file, without hitting the server 
$ kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
```

I abandoned the `--container=xxx --image=xxx` flags in the [deploy proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/deploy.md#kubectl-set) since it's much easier to use with just KEY=VALUE (CONTAINER_NAME=CONTAINER_IMAGE) pairs. 

Ref #21648 
@kubernetes/kubectl @bgrant0607 @kubernetes/sig-config 


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-20 07:13:45 -07:00
Casey Davenport 47248f3698 v1beta1 NetworkPolicy API definition and client support 2016-05-19 19:02:54 -07:00
Daniel Smith 5448400b1c Merge pull request #25243 from smarterclayton/explore_quantity
Provide an int64 version of Quantity that is much faster
2016-05-19 16:56:48 -07:00
Clayton Coleman e5fbf86157
Allow StatusErrors to be modified after creation 2016-05-19 09:08:53 -04:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -04:00
k8s-merge-robot c63ac4e664 Merge pull request #24331 from jsafrane/devel/refactor-binder
Automatic merge from submit-queue

Refactor persistent volume controller

Here is complete persistent controller as designed in https://github.com/pmorie/pv-haxxz/blob/master/controller.go

It's feature complete and compatible with current binder/recycler/provisioner. No new features, it *should* be much more stable and predictable.

Testing
--
The unit test framework is quite complicated, still it was necessary to reach reasonable coverage (78% in `persistentvolume_controller.go`). The untested part are error cases, which are quite hard to test in reasonable way - sure, I can inject a VersionConflictError on any object update and check the error bubbles up to appropriate places, but the real test would be to run `syncClaim`/`syncVolume` again and check it recovers appropriately from the error in the next periodic sync. That's the hard part.

Organization
---
The PR starts with `rm -rf kubernetes/pkg/controller/persistentvolume`. I find it easier to read when I see only the new controller without old pieces scattered around.
[`types.go` from the old controller is reused to speed up matching a bit, the code looks solid and has 95% unit test coverage].

I tried to split the PR into smaller patches, let me know what you think.

~~TODO~~
--

* ~~Missing: provisioning, recycling~~.
* ~~Fix integration tests~~
* ~~Fix e2e tests~~

@kubernetes/sig-storage

<!-- 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/24331)
<!-- Reviewable:end -->

Fixes #15632
2016-05-19 03:06:46 -07:00
Janet Kuo a178b5d553 Support sort-by timestamp in kubectl get 2016-05-18 21:36:44 -07:00
Janet Kuo 4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Kevin 52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
k8s-merge-robot e4e6e46197 Merge pull request #24799 from thockin/validation_pt8-2
Automatic merge from submit-queue

Make IsValidLabelValue return error strings

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-18 04:08:15 -07:00
k8s-merge-robot 5ffebfa303 Merge pull request #24016 from XiaoningDing/federation-kubectl
Automatic merge from submit-queue

Federation kubectl for clusters

add federation/clusters resource to kubectl
#23653, requires #23847

<!-- 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/24016)
<!-- Reviewable:end -->
2016-05-18 02:23:07 -07:00
Tim Hockin 66d0d87829 Make IsValidLabelValue return error strings 2016-05-17 21:36:10 -07:00
Brendan Burns 178b5f7638 address comments 2016-05-17 10:24:29 -07:00
Jan Safranek af295719f6 Add events. 2016-05-17 15:14:11 +02:00
Prashanth Balasubramanian daa8e29c5b Add a kubectl create secret tls command 2016-05-16 22:38:56 -07:00
Clayton Coleman 2a53330700
Describe and get should show init containers 2016-05-17 00:29:54 -04:00
Brendan Burns d8daa07f08 address comments 2016-05-16 16:50:53 -07:00
Brendan Burns 092afb6285 Address comments. 2016-05-16 16:50:53 -07:00
Brendan Burns 3c9fb1b651 Add a 'kubectl clusterinfo dump' option 2016-05-16 16:50:53 -07:00
jianhuiz 6f8fc60d06 describe for clusters 2016-05-16 16:34:08 -07:00
jianhuiz 586eea0691 add get/create/delete for clusters 2016-05-16 16:34:08 -07:00
deads2k 0adc0ab5b2 make kubectl edit handle lists again 2016-05-16 11:02:10 -04:00
k8s-merge-robot 9cf6642531 Merge pull request #25110 from metral/recursive-rollout
Automatic merge from submit-queue

enable recursive processing in kubectl rollout

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-diff-61290415

It makes use of the recursive processing of a directory in `kubectl rollout {undo,pause,resume}` which now also conforms to the [command conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md#command-implementation-conventions).

`kubectl rollout history` is being omitted for the time being as its encountering what appears to be an anomaly of an issue: https://github.com/kubernetes/kubernetes/issues/24606. Once this issue has been resolved I will modify it to be recursive
2016-05-15 06:14:21 -07:00
k8s-merge-robot 5d6c5f5af8 Merge pull request #25022 from zhouhaibing089/sort-fix
Automatic merge from submit-queue

Support struct,array,slice types when sorting kubectl output

Fixes https://github.com/kubernetes/kubernetes/issues/24328.

Briefly, `sorting_printer` only take cares of the following type kinds:

*   `reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64`
*   `reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64`
*   `reflect.Float32, reflect.Float64`
*   `reflect.String`
*   `reflect.Ptr`

This commit aims to add `reflect.Struct, reflect.Slice, reflect.Array`.

/cc @bgrant0607
2016-05-15 04:16:12 -07:00
Clayton Coleman 5d40f94feb
Rolling updater should allow progress to be logged / detected
Allows callers to terminate early as well as print useful messages
during the rollout. Use a crude percentage metric for summarization.
2016-05-14 22:54:02 -04:00
k8s-merge-robot b8f1682695 Merge pull request #24090 from AdoHe/expose_rc
Automatic merge from submit-queue

fix expose multi protocols issue

Please refer #23882 for more detail. @bprashanth @bgrant0607 ptal.

<!-- 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/24090)
<!-- Reviewable:end -->
2016-05-14 07:15:58 -07:00
amehdy 0c5713084b Fixed misleading error message when a resource with no selector or name is provided to kubectl delete or label command 2016-05-14 02:04:35 -07:00
k8s-merge-robot 4486385bc6 Merge pull request #25267 from pwittrock/kubectl-retry-simple
Automatic merge from submit-queue

Retry fetching http urls passed to '-f' in kubectl.

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
* kubectl now retries failed http gets for urls passed through the '-f' flag.
```


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

Closes #24089.
2016-05-13 22:44:24 -07:00
Matt Liggett f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07:00
Jeff Lowdermilk 8329b7d624 Merge pull request #25305 from AdoHe/pod_ip
add ip to pod wide output
2016-05-13 15:05:30 -07:00
k8s-merge-robot ce80372573 Merge pull request #25500 from mml/2016
Automatic merge from submit-queue

It's 2016, yo.
2016-05-13 14:24:57 -07:00
k8s-merge-robot 399b086620 Merge pull request #23684 from luxas/auto_label_arch
Automatic merge from submit-queue

Automatically add node labels beta.kubernetes.io/{os,arch}

Proposal: #17981
As discussed in #22623:
> @davidopp: #9044 says cloud provider but can also cover platform stuff.

Adds a label `beta.kubernetes.io/platform` to `kubelet` that informs about the os/arch it's running on.
Makes it easy to specify `nodeSelectors` for different arches in multi-arch clusters.

```console
$ kubectl get no --show-labels
NAME        STATUS    AGE       LABELS
127.0.0.1   Ready     1m        beta.kubernetes.io/platform=linux-amd64,kubernetes.io/hostname=127.0.0.1
$ kubectl describe no
Name:			127.0.0.1
Labels:			beta.kubernetes.io/platform=linux-amd64,kubernetes.io/hostname=127.0.0.1
CreationTimestamp:	Thu, 31 Mar 2016 20:39:15 +0300
```
@davidopp @vishh @fgrzadkowski @thockin @wojtek-t @ixdy @bgrant0607 @dchen1107 @preillyme
2016-05-13 13:25:34 -07:00
Matt Liggett 2bc46d5085 It's 2016, yo. 2016-05-13 12:41:40 -07:00
Jeff Lowdermilk e9aecf6b9e Merge pull request #25181 from janetkuo/kubectl-suggest
kubectl suggest for get (list, ps), and delete(rm)
2016-05-13 10:08:22 -07:00
Saad Ali ab6c3121eb Merge pull request #25191 from rajdeepd/master
Added negative test case for namespace
2016-05-12 15:50:13 -07:00
Clayton Coleman 51b624103f
Change ConvertToVersion to use GroupVersion
Long delayed refactor, avoids a few more allocations.
2016-05-12 10:10:35 -04:00
Clayton Coleman a84e62d9e6
Change ObjectKind signature to avoid allocations
We don't need to pass a pointer into SetGroupKindVersion() - a
struct works just as well.
2016-05-12 10:10:35 -04:00
k8s-merge-robot 0c2641d4ea Merge pull request #19946 from janetkuo/kubectl-rollout-status
Automatic merge from submit-queue

Add `kubectl rollout status`

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
Implement `kubectl rollout status` that can be used to watch a deployment's rollout status
```

Addresses #17168; depends on #19882 (the "Add kubectl rollout" commit).
See [proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/deploy.md#deployment-version). 

cc @bgrant0607 @nikhiljindal @ironcladlou @kargakis @kubernetes/sig-config @kubernetes/kubectl  @madhusudancs

<!-- 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/19946)
<!-- Reviewable:end -->
2016-05-12 06:28:49 -07:00
Mike Metral 30f21fd431 enable recursive processing in kubectl rollout 2016-05-12 01:27:17 -07:00
Wojciech Tyczynski 2706df102b Merge pull request #25465 from wojtek-t/client_renegotiation
Support renegotiation in client based on response ContentType
2016-05-12 10:21:10 +02:00
Wojciech Tyczynski 5d046fed41 Fix tests for renegotiation 2016-05-12 08:21:11 +02:00
AdoHe e830d03ffc add ip to pod wide output 2016-05-12 00:30:25 -04:00
k8s-merge-robot 4e57c80052 Merge pull request #24600 from pweil-/psp
Automatic merge from submit-queue

PSP admission

```release-note
Update PodSecurityPolicy types and add admission controller that could enforce them
```

Still working on removing the non-relevant parts of the tests but I wanted to get this open to start soliciting feedback.

- [x] bring PSP up to date with any new features we've added to SCC for discussion
- [x] create admission controller that is a pared down version of SCC (no ns based strategies, no user/groups/service account permissioning)
- [x] fix tests

@liggitt @pmorie - this is the simple implementation requested that assumes all PSPs should be checked for each requests.  It is a slimmed down version of our SCC admission controller

@erictune @smarterclayton
2016-05-11 21:26:45 -07:00
AdoHe ad97cddb3e fix expose multi protocols issue 2016-05-12 00:07:07 -04:00
k8s-merge-robot ac50a70992 Merge pull request #25459 from errm/misspell
Automatic merge from submit-queue

Corrects some misspellings in comments

This should help to make
https://goreportcard.com/report/k8s.io/kubernetes#misspell
look a little nicer.
2016-05-11 19:18:30 -07:00
Paul Weil 56193b7140 PSP types 2016-05-11 18:07:35 -04:00
k8s-merge-robot e0f7de94f5 Merge pull request #25279 from piosz/hpa-ga
Automatic merge from submit-queue

Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling

ref #21577

@lavalamp could you please review or delegate to someone from CSI team?
@janetkuo could you please take a look into the kubelet changes?

cc @fgrzadkowski @jszczepkowski @mwielgus @kubernetes/autoscaling
2016-05-11 13:19:42 -07:00
k8s-merge-robot 7ae1dab280 Merge pull request #25172 from pwittrock/kubectl-apiversion
Automatic merge from submit-queue

Kubectl support for validating nested objects with different ApiGroups

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
kubectl now supports validation of nested objects with different ApiGroups (e.g. objects in a List)
```


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

#24089
2016-05-11 10:11:55 -07:00
k8s-merge-robot c042156590 Merge pull request #25444 from janetkuo/kubectl-set
Automatic merge from submit-queue

Add 'kubectl set'

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.

```release-note
```

Ref #21648, the parent `kubectl set` command; will add more sub-command in subsequent PRs. @kubernetes/kubectl 


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-11 05:15:32 -07:00
Ed Robinson afdbad078a
Corrects some misspellings in comments
This should help to make
https://goreportcard.com/report/k8s.io/kubernetes#misspell
look a little nicer.
2016-05-11 08:16:13 +01:00
k8s-merge-robot c10d12b7b7 Merge pull request #24923 from mwielgus/drain-refactor
Automatic merge from submit-queue

Small refactoring around drain - move drain logic to separate function.

cc: @piosz @fgrzadkowski
2016-05-10 19:44:21 -07:00
Fabio Yeon 0809b2be4d Merge pull request #25119 from XiaoningDing/api-shared-annotations
move shared annotations to new api/annotations package
2016-05-10 19:34:17 -07:00
Janet Kuo eb58cd6676 Add 'kubectl set' 2016-05-10 17:24:25 -07:00
Fabio Yeon a167a6b4df Merge pull request #25308 from AdoHe/deployment_panic
fix rollout nil panice issue
2016-05-10 15:51:22 -07:00
Janet Kuo 67becccda0 Add kubectl rollout status 2016-05-10 13:49:39 -07:00
Lucas Käldström c28524fbab Add operatingsystem/architecture as node labels. Also, display that in status 2016-05-10 20:38:57 +03:00
Rajdeep Dua 51b5b895a8 release-note-none
Added negative test case for namespace
2016-05-10 09:55:14 -07:00
Phillip Wittrock 680b2b9d09 Kubectl support for validating nested objects with different ApiGroups (e.g. Lists containing objects in different api groups). Closes #24089 2016-05-09 19:38:40 -07:00
Phillip Wittrock b9f9d130d7 Address PR comments 2 2016-05-09 16:23:15 -07:00
Phillip Wittrock 3d08c73767 Address PR Comments 1 2016-05-09 16:21:30 -07:00
Phillip Wittrock 75417ba3e4 Retry fetching http urls passed to '-f' in kubectl.
Closes #24089.
2016-05-09 15:58:17 -07:00
jianhuiz 441e206671 move server client shared annotations to new api/annotations package 2016-05-09 11:10:44 -07:00
Piotr Szczesniak 212b459817 Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling 2016-05-09 09:18:13 +02:00
Tim Hockin 527cb50583 Demand at least go1.6 2016-05-08 20:30:37 -07:00
k8s-merge-robot 41b7b04faf Merge pull request #24554 from ingvagabund/dhodovska-events-flag-for-describers
Automatic merge from submit-queue

Introduce events flag for describers

Printing events for a given object is not always needed. Thus, introducing --show-events=false to ``kubectl describe`` to skip events printing.

Fixes: #24239
2016-05-08 14:41:28 -07:00
k8s-merge-robot f40fe7173b Merge pull request #24304 from cjcullen/cacheauth
Automatic merge from submit-queue

Support persisting config from kubecfg AuthProvider plugins

Plumbs through an interface to the plugin that can persist a `map[string]string` config for just that plugin. Also adds `config` to the AuthProvider serialization type, and `Login()` to the AuthProvider plugin interface.
Modified the gcp AuthProvider to cache short-term access tokens in the kubecfg file.

Builds on #23066 
@bobbyrullo @deads2k @jlowdermilk @erictune
2016-05-08 13:27:57 -07:00
k8s-merge-robot 53b3ef2122 Merge pull request #23988 from php-coder/kubectl_describe_multiline_labels
Automatic merge from submit-queue

kubectl describe: show multiple labels/annotations on multiple lines

Small UX improvement: when there is more than one label/annotation, it's more readable to see them on the different lines.

Before:
```console
$ kubectl describe svc
Name:			s2i-test
Namespace:		test2
Labels:			app=s2i-test,foo=bar
...
```
After:
```console
$ kubectl describe svc
Name:			s2i-test
Namespace:		test2
Labels:			app=s2i-test
				foo=bar
...
```
This change affects output of the labels/annotations in many of the sub-commands of the `kubectl describe`.

PTAL @smarterclayton @kargakis
2016-05-08 12:51:45 -07:00
k8s-merge-robot 601e09852c Merge pull request #23590 from kargakis/timeout-logs-attach
Automatic merge from submit-queue

kubectl: more sophisticated pod selection for logs and attach

Trying to get the logs or attach to an object other than a pod
will poll forever if that object has no replicas. This commit adds
a 20s timeout for polling.

@kubernetes/kubectl @deads2k @fabianofranz
2016-05-08 10:51:00 -07:00
CJ Cullen 86293810af Move ModifyConfig (and some related functions) into the clientcmd pkg. 2016-05-07 18:15:18 -07:00
AdoHe d1480cd8df fix rollout nil panice issue 2016-05-07 10:06:13 -04:00
Janet Kuo 57c2a28b92 Clarify limit/requests flags in kubectl run 2016-05-06 16:32:43 -07:00
Robert Bailey 0db3ca4b50 Merge pull request #24989 from derekwaynecarr/fix_secret_cmd
Fix kubectl create secret/configmap to allow = values
2016-05-06 15:18:50 -07:00
Robert Bailey 385ae07bc6 Merge pull request #24919 from kargakis/avoid-panic-in-mapper
kubectl: avoid panic with nil gvk
2016-05-06 15:07:05 -07:00
Robert Bailey f01f9f2237 Merge pull request #24955 from AdoHe/output_nil
fix config view output bug
2016-05-06 14:49:43 -07:00
Robert Bailey 76912008b4 Merge pull request #25035 from kargakis/remove-dead-factory-code
kubectl: remove dead factory code
2016-05-06 14:12:26 -07:00
Robert Bailey bb08b27e43 Merge pull request #25072 from AdoHe/deprecate_container_port
mark container-port flag as deprecated
2016-05-06 14:10:14 -07:00
Robert Bailey 7df41be489 Merge pull request #24403 from kargakis/use-platform-agnostic-func
kubectl: use platform-agnostic helper in edit
2016-05-06 13:26:12 -07:00
Jan Chaloupka dd2c9c578d Introduce kubectl describe --show-events
Introduce DescriberSettings for Describer display options
Introduce --show-events flag and DescriberSettings in Describer methods
Introduce unit-tests
Regenerated kubectl describe docs
Add events flag tests to test-cmd.sh

Signed-off-by: dhodovsk@redhat.com
Signed-off-by: jchaloup@redhat.com
2016-05-06 11:40:11 +02:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
k8s-merge-robot f5e1e9a227 Merge pull request #24912 from bprashanth/petset_controller
Automatic merge from submit-queue

Petset controller

Took longer than I expected. Main parts of this pr are:
1. Identity generation based on petset spec (volumes are mapped per discussion in #18016)
2. Ensure that we create/delete pets in sequence
3. Ensuring that we create, wait for healthy, create; or delete, wait for terminationGrace, delete
4. Controller that watches apiserver and drives actual -> desired

PVCs are not deleted, yet.
2016-05-05 08:58:23 -07:00
Prashanth Balasubramanian 6bc3052551 PetSet alpha controller 2016-05-04 18:39:17 -07:00
Janet Kuo 181627e36c kubectl suggest for get (list, ps), and delete(rm) 2016-05-04 17:18:52 -07:00
k8s-merge-robot 53ea2cb444 Merge pull request #25074 from AdoHe/remove_container_args
Automatic merge from submit-queue

update kubectl apply help info

Please refer #22342 for more detail. @bgrant0607 ptal. Also I have open a PR to update docs on `kuberntes.github.io`
2016-05-04 14:44:14 -07:00
derekwaynecarr 25ed62c3ea Fix kubectl create secret/configmap to allow = values 2016-05-04 17:14:12 -04:00
k8s-merge-robot 93e3df8e55 Merge pull request #24789 from wojtek-t/use_proper_codec_in_client
Automatic merge from submit-queue

Use proper codec in client
2016-05-04 11:00:04 -07:00
k8s-merge-robot 1642083e60 Merge pull request #24645 from jlowdermilk/rolling-update
Automatic merge from submit-queue

kubectl rolling-update support for same image

Fixes #23497.

Enables `kubectl rolling-update --image` to the same image, adding a `--image-pull-policy` flag to remove ambiguity. This allows rolling-update to behave as an "update and/or restart" (https://github.com/kubernetes/kubernetes/issues/23497#issuecomment-212349730), or as a forced update when the same tag can mean multiple versions (e.g. `:latest`). cc @janetkuo @nikhiljindal
2016-05-04 07:24:22 -07:00
Wojciech Tyczynski 3aadafd411 Use NegotiatedSerializer in client 2016-05-04 10:57:36 +02:00
Marcin Wielgus 60f1339138 Small refactoring around drain - move drain logic to separate function. 2016-05-04 10:43:20 +02:00
AdoHe 036ac359d1 update kubectl apply help info 2016-05-03 22:50:24 -04:00
AdoHe ba69f0f367 mark container-port flag as deprecated 2016-05-03 20:36:42 -04:00
k8s-merge-robot c66250dd0d Merge pull request #24548 from pwittrock/kubectl
Automatic merge from submit-queue

Delete unused helpers
2016-05-03 11:26:25 -07:00
zhouhaibing089 09d4d5ed78 let type struct,array,slice also being considerred when sorting kubectl output 2016-05-02 23:17:18 +08:00
k8s-merge-robot f500194d92 Merge pull request #23673 from metral/multiple-resources
Automatic merge from submit-queue

allow kubectl subcmds to process multiple resources

~~autoscale, expose & patch~~ Many kubectl subcommands were limited to processing one resource at a time.

This PR allows those subcommands to process multiple resources.

This PR is in reference to https://github.com/kubernetes/kubernetes/pull/23116#issuecomment-202360784 by @deads2k
2016-05-02 07:09:44 -07:00
Michail Kargakis a25088fe15 kubectl: more sophisticated pod selection for logs and attach 2016-05-02 15:56:36 +02:00
Michail Kargakis dbc1e356d3 kubectl: remove dead factory code 2016-05-02 11:03:44 +02:00
Mike Metral 999c8e211e allow kubectl subcmds to process multiple resources
- use resource.Visit() to recursively process resources, as well as, aggregate
errors where possible
2016-05-01 20:27:37 -07:00
k8s-merge-robot b930d58fcb Merge pull request #24994 from pmorie/kubectl-configmap
Automatic merge from submit-queue

Fix `kubectl create configmap` help

Resurrection of #23290

cc @bgrant0607 @janetkuo @ncdc
2016-04-29 23:09:42 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Andy Goldstein 8858d20044 Fix `kubectl create configmap` help
Remove "generic" from the help text, as that was an inadvertent carry-over from `kubectl create
secret generic`.
2016-04-29 16:31:24 -04:00
k8s-merge-robot 2b7021add0 Merge pull request #17030 from csrwng/pf_cmd_streams
Automatic merge from submit-queue

Port-forward: use out and error streams instead of glog

Switches use of glog with command out and error streams
2016-04-29 09:27:47 -07:00
AdoHe 6958db9c16 fix config view output bug 2016-04-28 23:04:57 -04:00
Slava Semushin e83200d322 printLabelsMultilineWithIndent: add more customizable method. 2016-04-28 18:37:41 +02:00
Slava Semushin 72b4b54f28 kubectl describe: show multiple labels/annotations on multiple lines.
When there is more than one label/annotation, it's more readable to see
them on the different lines.
2016-04-28 18:37:41 +02:00
Michail Kargakis 29ff69fd83 kubectl: avoid panic with nil gvk
The decoder will return a nil gvk in case it errors out and getting
the version out of that gvk naturally will panic. Bail out as soon
as we can check that the error is non-nil. kubectl edit was the primary
victim.
2016-04-28 11:14:15 +02:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -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
Cesar Wong 55114efcb7 Port-forward: use out and error streams instead of glog 2016-04-27 13:26:54 -04:00
Marcin Wielgus 41dde20410 Make DrainOptions.getPodsForDeletion public to be reused in ClusterAutoscaler 2016-04-27 11:47:34 +02:00
k8s-merge-robot 373a3ece84 Merge pull request #24475 from k82/k8s-24411
Automatic merge from submit-queue

Clarify `kubectl get service` output.

Pull request for #24411 .
2016-04-26 13:45:09 -07:00
k8s-merge-robot 96586e7c60 Merge pull request #23958 from petervo/byte-args
Automatic merge from submit-queue

kubectl: Allow []byte config fields to be set by the cli

Allows []byte config fields such as 'certificate-authority-data' to be set using `kubectl config set` commands.
2016-04-26 10:23:07 -07:00
Jeff Lowdermilk 1baa473ef2 kubectl rolling-update support for same image 2016-04-25 09:20:15 -07:00