Commit Graph

536 Commits (06bc7e3e0026ea25065f59f4bd305c0b7dbbc145)

Author SHA1 Message Date
Avesh Agarwal 87d6ee451e Fix kubectl describe for priority class objects. 2018-02-21 13:07:06 -05:00
David Eads be04e7c1b1 collapse printing paths 2018-02-21 08:15:22 -05:00
Kubernetes Submit Queue 370540f90d
Merge pull request #60057 from deads2k/cli-07-printer
Automatic merge from submit-queue (batch tested with PRs 59391, 58097, 60057, 60090). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleanup printers some more

This cleans up some more dead printer flags and unnecessary arguments for various methods.  We're getting closer.  Still need to clean up some ugly around `PrintSuccess` and then its time to start trimming layers.

@kubernetes/sig-cli-maintainers 

```release-note
NONE
```
2018-02-20 13:51:35 -08:00
Kubernetes Submit Queue 6235a60906
Merge pull request #60032 from humblec/allowvolumeexpansion
Automatic merge from submit-queue (batch tested with PRs 59634, 59821, 57850, 59916, 60032). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

AllowVolumeExpansion field to storageclass describe

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-02-20 12:39:43 -08:00
David Eads dd6405681f cleanup printers some more 2018-02-20 12:59:40 -05:00
Humble Chirammal 0512d036d5 AllowVolumExpansion field to describe printer.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-19 16:27:57 +05:30
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Kubernetes Submit Queue bb500a73b6
Merge pull request #59353 from juanvallejo/jvallejo/update-name-printer-output
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update name printer output to kind.group/name

**Release note**:
```release-note
NONE
```

Followup to https://github.com/kubernetes/kubernetes/pull/59227

Updates output via `-o name` to be pipeable.

cc @deads2k
2018-02-15 10:37:19 -08:00
juanvallejo 765f9ec68b
update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
mlmhl 49dcdbe2c5 add description of pvc condition for kubectl describe command 2018-02-10 19:22:15 +08:00
Kubernetes Submit Queue b922ffc491
Merge pull request #54685 from zjj2wry/node_detail_unschedule
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add unchedule information to kubectl describe node

**What this PR does / why we need it**:
Fixes #53721

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
cc @smarterclayton
now output: 
```
		Name:               bar
		Roles:              <none>
		Labels:             <none>
		Annotations:        <none>
		Taints:             <none>
		Unschedulable:      true
		CreationTimestamp:  Mon, 01 Jan 0001 00:00:00 +0000
```

**Release note**:

```release-note
NONE
```
2018-02-08 04:13:21 -08:00
Kubernetes Submit Queue 6827c3cf47
Merge pull request #59309 from zhangxiaoyu-zidif/fix-node-describe
Automatic merge from submit-queue (batch tested with PRs 59539, 59309). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix describe when allocatable CPU/Memory is 0

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-08 02:18:37 -08:00
zhangxiaoyu-zidif ba2404fde0 fix describe when allocatable CPU/Memory is 0 2018-02-08 16:33:09 +08:00
Kubernetes Submit Queue e87f1cbc88
Merge pull request #52942 from amitkumarj441/patch-3
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix typo

**What this PR does / why we need it**: To fix typo in annotations

**Release note**:

```release-note
NONE
```
2018-02-06 07:10:00 -08:00
zhengjiajin df4586b775 add unchedule information to kubectl describe node 2018-02-06 20:14:46 +08:00
Kubernetes Submit Queue 9ee71b720e
Merge pull request #59059 from smarterclayton/move_partial_object
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Promote v1alpha1 meta to v1beta1

No code changes, just renames. We can discuss if there are any field / naming changes here or in a follow-up

Parent #58536
Fixes #53224
Prereq to #55637

@kubernetes/sig-api-machinery-pr-reviews @deads2k

```release-note
The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`.  Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`.  Older servers will ignore this representation or return an error if it is not available.  Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
```
2018-02-05 12:40:37 -08:00
Kubernetes Submit Queue f65f07225f
Merge pull request #59169 from NickrenREN/kubectl-pv-terminating
Automatic merge from submit-queue (batch tested with PRs 55439, 58564, 59028, 59169, 59259). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubectl: Add Terminating state to PVs

kubectl shows PV `Terminating` status, just like Pod and [PVC](https://github.com/kubernetes/kubernetes/pull/55873)

**What this PR does / why we need it**:
We will postpone PV deletion if it is bound to a PVC, see #58743, so we may keep PV waiting for deletion for a longer time than before so users should know what is going on.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
xref: https://github.com/kubernetes/community/pull/1608

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
/sig cli
/sig storage
/assign @jsafrane 

I tested this PR on my local host.
```
nickren@nickren-14:~/test/test$ kubectl delete -f pv.yaml 
persistentvolume "task-pv-volume" deleted
nickren@nickren-14:~/test/test$ kubectl get pv
NAME             CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS        CLAIM                   STORAGECLASS   REASON    AGE
task-pv-volume   1Gi        RWO            Delete           Terminating   default/task-pv-claim   standard                 27s
nickren@nickren-14:~/test/test$ kubectl describe pv task-pv-volume
Name:            task-pv-volume
Labels:          type=local
Annotations:     pv.kubernetes.io/bound-by-controller=yes
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    standard
Status:          Terminating (since Thu, 01 Feb 2018 13:18:51 +0800)
Claim:           default/task-pv-claim
Reclaim Policy:  Delete
Access Modes:    RWO
Capacity:        1Gi
Message:         
Source:
    Type:          HostPath (bare host directory volume)
    Path:          /tmp/data
    HostPathType:  
Events:            <none>
```
2018-02-02 17:17:42 -08:00
Clayton Coleman d07a608607 Promote v1alpha1 meta to v1beta1
No code changes, just renames
2018-02-02 14:00:45 -05:00
NickrenREN 7364c4c019 Add Terminating state to PVs 2018-02-02 23:33:45 +08:00
Bobby (Babak) Salamat 384a86caa9 Add NominatedNodeName to PodStatus 2018-01-30 13:13:57 -08:00
Kubernetes Submit Queue 5efb88ddf7
Merge pull request #58840 from alexcope/docbug
Automatic merge from submit-queue (batch tested with PRs 57500, 58840, 58883). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add allowPrivilegeEscalation to kubectl describe psp

**What this PR does / why we need it**:
Add allowPrivilegeEscalation to kubectl describe psp

**Which issue(s) this PR fixes**
Fixes #57974 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-26 13:34:36 -08:00
Alex Cope 723c1ecb78 Add allowPrivilegeEscalation to kubectl describe psp
This fixes issue #57974
2018-01-25 16:41:46 -08:00
Manuel de Brito Fontes a39ae8ee08 Show all the annotations in ingress rules 2018-01-19 14:13:17 -03:00
Kubernetes Submit Queue 44d0ba29d3
Merge pull request #56960 from islinwb/remove_unused_code_ut_pkg
Automatic merge from submit-queue (batch tested with PRs 53631, 56960). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove unused code in UT files in pkg/

**What this PR does / why we need it**:
Remove unused code in UT files in pkg/ .

**Release note**:

```release-note
NONE
```
2018-01-18 02:41:29 -08:00
Kubernetes Submit Queue ff626a35fe
Merge pull request #57507 from dixudx/describe_pod_hostport
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add hostPorts to pod describer

**What this PR does / why we need it**:
Missing `HostPorts` when describing pods

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
/assign @mengqiy @shiywang
**Release note**:

```release-note
None
```
2018-01-16 10:26:19 -08:00
Kubernetes Submit Queue 1dbb4197c4
Merge pull request #56331 from shiywang/fix_indent
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove spaces from kubectl describe hpa

Fixes comment left here: https://github.com/kubernetes/kubernetes/pull/36033#discussion_r108020701

@kubernetes/sig-cli-pr-reviews  @DirectXMan12 

```release-note
remove spaces from kubectl describe hpa
```
2018-01-16 00:10:26 -08:00
linweibin fa8afc1d39 Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
Di Xu f91858d868 add hostPorts to pod describer 2018-01-11 23:12:45 +08:00
Kubernetes Submit Queue 35a0ff7d72
Merge pull request #56680 from weekface/weekface/tiny-fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove some useless code

**What this PR does / why we need it**:
code optimization,remove some useless code.

**Release note**:

```release-note
NONE
```
2018-01-03 09:22:22 -08:00
Kubernetes Submit Queue d3188b91bf
Merge pull request #56952 from Lion-Wei/kubectl-3
Automatic merge from submit-queue (batch tested with PRs 56952, 57697). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove /k8s.io/kubernetes/pkg/kubectl/testing

**What this PR does / why we need it**:

The package `/k8s.io/kubernetes/pkg/kubectl/testing` only have one type `TestStruct` and only used in `printers_test.go`, so removed it and created a similar type in `printers_test.go`.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubectl#164

**Special notes for your reviewer**:


**Release note**:
```release-note
NONE
```
2018-01-03 00:30:30 -08:00
Kubernetes Submit Queue b48e288ead
Merge pull request #57657 from kkmsft/kubectl-providerID
Automatic merge from submit-queue (batch tested with PRs 57699, 57657). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add 'ProviderID' to the output of kubectl describe node....

**What this PR does / why we need it**:
This PR adds displaying 'ProviderID' field in the kubectl  describe node.. command output.

**Release note**:

```release-note
NONE
```
2018-01-02 21:44:43 -08:00
Lion-Wei 071200128f remove /k8s.io/kubernetes/pkg/kubectl/testing 2018-01-03 09:39:33 +08:00
Kubernetes Submit Queue a0f8dd85b3
Merge pull request #57399 from php-coder/fix_flex_pvs_describe
Automatic merge from submit-queue (batch tested with PRs 57399, 57751, 57475). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

printFlexPersistentVolumeSource: fix format

**What this PR does / why we need it**:
This PR fixes invalid format.

**Special notes for your reviewer**:
Addresses https://github.com/kubernetes/kubernetes/pull/56460#discussion_r153583731
Fixes #57694

**Release note**:
```release-note
NONE
```

PTAL @liggitt 
CC @simo5
2018-01-02 10:57:51 -08:00
Krishnakumar R afb23afdb9 Add 'ProviderID' to the output of kubectl describe node.... 2017-12-27 11:24:06 +00:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Slava Semushin 1c41db6178 printFlexPersistentVolumeSource: fix format. 2017-12-19 13:16:12 +01:00
Kubernetes Submit Queue 403a3fa10a
Merge pull request #57202 from php-coder/fix_vsphere_volume_describer
Automatic merge from submit-queue (batch tested with PRs 55977, 56198, 57202, 57254, 57214). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix format string in describers

**What this PR does / why we need it**:
This PR fixes bug in the Vsphere Volume Source and other describers.

Before this fix `kubectl describe` could show something like this:
```
Source:
	Type:       vSphereVolume (a Persistent Disk resource in vSphere)
	VolumePath:     StoragePolicyName:  %v

	FSType:                             volumes/PVDISK_001
%!(EXTRA string=ext4, string=)Events:   <none>
```
It happened because format string was accidentally split to 2 strings and was interpreted in a wrong way.

**Release note**:
```release-note
NONE
```

CC @simo5
2017-12-17 08:26:50 -08:00
Slava Semushin 41bd2f5f85 Fix format string in describers. 2017-12-15 15:54:25 +01:00
Jordan Liggitt d073c10dbc
Refactor flex pv to allow secret namespace 2017-12-13 23:32:16 -05:00
weekface 7df64d59fb Remove useless error 2017-12-05 11:21:31 +08:00
Marko Luksa 947b3fa66d Fix bad column alignment when using custom columns from OpenAPI schema 2017-11-30 09:58:56 +01:00
Shiyang Wang f42f79edb0 fix spaces around the / 2017-11-27 18:28:18 +08:00
Haoran Wang 98faf6b39c support flexvlome in psp 2017-11-23 16:06:51 +08:00
Kubernetes Submit Queue 8f23d76de1
Merge pull request #55873 from jsafrane/show-pvc-terminating
Automatic merge from submit-queue (batch tested with PRs 55873, 56156). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubectl: Add Terminating state to PVCs

kubectl should show something when a PVC has a deletion timestamp and is waiting for deletion. This patch follows Pod - it adds Terminating state.

For easier discovery of errors, finalizers are printed in `kubectl describe pvc`.

This is part of [PVC finalizer feature for 1.9](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/postpone-pvc-deletion-if-used-in-a-pod.md) where we will keep PVC waiting for deletion for a longer time than before so users should know what is going on.

/sig cli

**Release note**:
```release-note
NONE
```
2017-11-22 06:43:23 -08:00
Kubernetes Submit Queue ce1c9c57c5
Merge pull request #54811 from juanvallejo/jvallejo/consolidate-outputOpts-printOpts
Automatic merge from submit-queue (batch tested with PRs 54811, 54292, 56103). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

consolidate printer OutputOpts w PrintOpts

This patch removes the use of printers.OutputOptions in favor of only
having a single struct for setting / passing printer options set by user
flags.

This PR is related to https://github.com/kubernetes/kubernetes/pull/50113 and aims to break the set of changes 
introduced in [this commit](f4d717450f) in order to make them easier to review.

**Release note**:
```release-note
NONE
```

cc @fabianofranz @mengqiy @shiywang @seans3
2017-11-21 00:02:36 -08:00
Mitsuhiro Tanino 334a0f0620 Block Volume: cmdline printer update 2017-11-20 20:42:21 -05:00
juanvallejo d3773b4b06
consolidate printer OutputOpts w PrintOpts
This patch removes the use of printers.OutputOptions in favor of only
having a single struct for setting / passing printer options set by user
flags.
2017-11-20 14:49:23 -05:00
Huamin Chen bb34a0b7ef use SecretObject to reference iSCSI CHAP secret
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-11-18 20:02:44 +00:00
Kubernetes Submit Queue 941c6aa1db
Merge pull request #55835 from smarterclayton/table_printer_meta
Automatic merge from submit-queue (batch tested with PRs 55642, 55897, 55835, 55496, 55313). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Table printers and server generation should always copy ListMeta

Tables should be a mapping from lists, so if the incoming object has these add them to the table. Paging over server side tables was broken without this. Add tests on the generic creater and on the resttest compatibility.


@deads2k
2017-11-18 10:46:35 -08:00
Vladimir Vivien af0c2bda94 CSI - API change for CSI volume source type
This commit tracks source code update to support the CSI volume source type additionn.
2017-11-17 19:17:42 -05:00
Clayton Coleman d2a62fd422 Table printers and server generation should always copy ListMeta
Tables should be a mapping from lists, so if the incoming object has
these add them to the table. Allows paging over server side tables.
Add tests on the generic creater and on the resttest compatibility.
2017-11-17 10:30:32 -05:00
pospispa 22370d925e kubectl: Add Terminating state to PVCs
kubectl should show something when a PVC has a deletion timestamp and is
waiting for deletion. This patch follows Pod - it adds Terminating state.

For easier discovery of errors, finalizers are printed in `kubectl describe
pvc`.
2017-11-16 12:39:15 +01:00
Michelle Au b60bd37114 StorageClass API changes for VolumeBindingMode 2017-11-15 09:19:47 -08:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kubernetes Submit Queue 134e89e663
Merge pull request #54548 from wackxu/desser
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update the wrong format of string TargetPort

**What this PR does / why we need it**:

update the wrong format of string TargetPort

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54546 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-06 16:57:10 -08:00
Kubernetes Submit Queue 9459f4753a
Merge pull request #54853 from xiangpengzhao/des-netpol
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Describe NetworkPolicyEgressRule and IPBlock

**What this PR does / why we need it**:
- Describe IPBlock for NetworkPolicyIngressRule.
- Describe NetworkPolicyEgressRule
- Add test case for NetworkPolicyEgressRule
- Describe PolicyTypes

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
/cc @thockin @caseydavenport @cmluciano 

**Release note**:

```release-note
NONE
```
2017-11-06 13:21:19 -08:00
xiangpengzhao c691be3acf Switch field types to PodSelector and NamespaceSelector 2017-11-06 15:22:50 +08:00
Nikhita Raghunath 3b0b95ecbf Remove TPR remnants
There are still TPR types and generated client
in the extensions group. It is better to clean
that up, now that it has been removed from master.
2017-11-03 21:15:58 +05:30
xiangpengzhao bcdff4f174 Fix wrong format and output. 2017-11-03 11:54:43 +08:00
Kubernetes Submit Queue e2c3137900
Merge pull request #46341 from zhangxiaoyu-zidif/add-unittest-for-secret
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add unittest for describe secret

**What this PR does / why we need it**:
add unittest for describe secret


**Release note**:

```release-note
NONE
```
2017-11-01 04:33:15 -07:00
xiangpengzhao 3921ac9dd1 Describe PolicyTypes for Network Policy. 2017-11-01 16:11:27 +08:00
Kubernetes Submit Queue ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove created-by annotation

**What this PR does / why we need it**:
This PR removes `CreatedByAnnotation`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50720

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is no longer added to controller-created objects. Use the  `metadata.ownerReferences` item that has `controller` set to `true` to determine which controller, if any, owns an object.
```
2017-10-31 20:10:21 -07:00
Kubernetes Submit Queue a80985a283
Merge pull request #54617 from YuxiJin-tobeyjin/printpodwide
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add unit test for get pod -o wide

**What this PR does / why we need it**:
Add unit test for get pod -o wide;
In func printPod, one can choose to use "options.Wide", so unit test is needed accordingly.

**Release note**:

```release-note
```
NONE
2017-10-31 11:32:12 -07:00
xiangpengzhao 1aaac98e7a Add test case for NetworkPolicyEgressRule. 2017-10-31 19:47:01 +08:00
xiangpengzhao 0cf5a2dedc Describe NetworkPolicyEgressRule. 2017-10-31 19:46:48 +08:00
xiangpengzhao d735f660bc Describe IPBlock for NetworkPolicyIngressRule. 2017-10-31 18:03:14 +08:00
Kubernetes Submit Queue bd28e6d0ea
Merge pull request #46951 from aanm/kubectl-describe-netpol
Automatic merge from submit-queue (batch tested with PRs 54761, 54748, 53991, 54485, 46951). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enhanced the network policy describer.

**Which issue this PR fixes**: Fixes https://github.com/kubernetes/kubectl/issues/17

**Special notes for your reviewer**: I need help to set up the right clientset for the unt tests

@kubernetes/sig-network-pr-reviews 

ping @adohe 

As suggested in https://github.com/kubernetes/kubectl/issues/17 , the output is similar to:
```
Name:           access-backend
Namespace:      default
Created on:     2017-06-04 21:45:56 -0700 PDT
Labels:         <none>
Annotations:    <none>
Spec:
  Pod Selector:     foo in (bar1,bar2),foo2 notin (bar1,bar2),id=app1,id2=app3
  Allowing ingress traffic:
    To Port: 80/TCP
    To Port: 82/TCP
    From Pod Selector: id=app2,id2=app3
    From Namespace Selector: id=app2,id2=app3
    From Namespace Selector: foo in (bar1,bar2),id=app2,id2=app3
    ----------
    To Port: <any> (traffic allowed to all ports)
    From: <any> (traffic not restricted by source)
```
2017-10-30 15:38:36 -07:00
Kubernetes Submit Queue 25a98328b6
Merge pull request #54625 from wackxu/pppri
Automatic merge from submit-queue (batch tested with PRs 53796, 54666, 54516, 54625, 54704). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

print priority when describe pod

**What this PR does / why we need it**:

show the priority of pod when describe pod when we use pod priority

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54624 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-30 13:48:38 -07:00
Jun Xiang Tee efbfead4ef remove created-by annotation 2017-10-30 12:49:44 -07:00
wackxu 8808d505d6 print priority and priorityClassName when describe pod 2017-10-28 10:01:24 +08:00
YuxiJin-tobeyjin 131d612b13 Add unit test for get pod -o wide 2017-10-27 10:39:09 +08:00
Maru Newby adc338d330 Remove all traces of federation 2017-10-26 13:37:37 -07:00
Kubernetes Submit Queue 7d5dc528a0 Merge pull request #54013 from vladimirvivien/scaleio-secret-multi-tenancy
Automatic merge from submit-queue (batch tested with PRs 49865, 53731, 54013, 54513, 51502). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

ScaleIO - Ability to specify Secret's name and namespace 

**What this PR does / why we need it**:
This PR is to decouple the ScaleIO secret from the same namespace as that of the StorageClass/PVC/PV that uses it (#53619). Currently, authorized non-admin k8s user, who creates volumes, may end up having unauthorized access to ScaleIO secret information.  This PR introduces secret parameter that allows specification of secret's namespace.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53619 

**Release note**:
```release-note
ScaleIO persistent volumes now support referencing a secret in a namespace other than the bound persistent volume claim's namespace; this is controlled during provisioning with the `secretNamespace` storage class parameter; StoragePool and ProtectionDomain attributes no longer defaults to the value `default`
```
2017-10-26 13:24:34 -07:00
David Eads 322c6b5848 make printing deterministic 2017-10-26 07:56:09 -04:00
Kubernetes Submit Queue b9838a191d Merge pull request #51267 from zjj2wry/print-bug
Automatic merge from submit-queue (batch tested with PRs 53760, 48996, 51267, 54414). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix issue(#51245)1、kubectl printObj should not print header when occur…

… error. 2、kubectl get ns --all-namespaces should not have NAMESPACE column



**What this PR does / why we need it**:
closes #51245

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
now we will just get this.
```
admindeMacBook-Pro-2:kubectl admin$ ./kubectl get ns --all-namespaces
error: namespace is not namespaced
```

**Release note**:

```release-note
NONE
```
2017-10-25 17:37:07 -07:00
Vladimir Vivien 3fb3cc7122 ScaleIO - API source code update
This commit tracks all human-generated code for API source updates.
2017-10-25 16:05:48 -04:00
wackxu bfe6474dd0 update the wrong format of string TargetPort 2017-10-25 19:49:36 +08:00
André Martins bdbdac21a5 updating-bazel with pkg/apis/networking
Signed-off-by: André Martins <aanm90@gmail.com>
2017-10-25 12:18:28 +02:00
André Martins 35d976fda8 Enhanced the network policy describer
Signed-off-by: André Martins <aanm90@gmail.com>
2017-10-25 12:18:28 +02:00
Kubernetes Submit Queue 88ac8c0227 Merge pull request #52245 from zjj2wry/describe-sa
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix issue(#52244)kubectl describe serviceaccount have redundance null…

… line, we should keep accordance for kubectl describe command



**What this PR does / why we need it**:
close issue #52244

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-24 20:37:24 -07:00
Kubernetes Submit Queue 16cdda003c Merge pull request #54302 from sbezverk/refactor_rbd_volume
Automatic merge from submit-queue (batch tested with PRs 54229, 54380, 54302, 54454). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor RBD volume

Refactor RBD Volume Persistent Volume Spec so RBD PV's SecretRef
allows referencing a secret from a persistent volume in any namespace.
This allows locating credentials for persistent volumes in namespaces
other than the one containing the PVC.
Closes #54432
```release-note
RBD Persistent Volume Sources can now reference User's Secret in namespaces other than the namespace of the bound Persistent Volume Claim
```
2017-10-24 08:35:11 -07:00
Serguei Bezverkhi 1411c2698e Refactor RBD volume 2017-10-23 16:59:34 -04:00
zhangxiaoyu-zidif 46e33f4234 Delete redundant err check 2017-10-23 13:46:04 +08:00
zhengjiajin d9dbfc7861 fix issue(51245)kubectl printObj should not print header when occur error 2017-10-20 18:01:09 +08:00
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Kubernetes Submit Queue a6625085f5 Merge pull request #52473 from tianshapjq/typo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

typo in annotations

**What this PR does / why we need it**: just typo in annotations

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Release note**:

```release-note
none
```
2017-10-16 08:28:09 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Di Xu 5a9313e10b update cluster printer to enable --show-labels 2017-10-12 14:05:58 +08:00
Kubernetes Submit Queue 6398d40eaf Merge pull request #47026 from zhangxiaoyu-zidif/add-unittest-limitrange-describe
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add unittest for describe LimitRange

**What this PR does / why we need it**:
Add unittest for describe LimitRange

**Release note**:

```release-note
NONE
```
2017-10-06 16:05:26 -07:00
jianhuiz 091a9dfc35 outputs <none> for colums not found 2017-09-27 11:27:55 -07:00
Janet Kuo 3130132542 Support apps.ReplicaSet in kubectl describe 2017-09-26 10:54:04 -07:00
Kubernetes Submit Queue 476e207aef Merge pull request #52484 from zjj2wry/cronjob
Automatic merge from submit-queue (batch tested with PRs 50890, 52484, 52542, 52567, 50672). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

fix kubectl get cronjob lose age info

**What this PR does / why we need it**:
relate with #20941
befere output:
```
NAME      SCHEDULE      SUSPEND   ACTIVE    LAST SCHEDULE   AGE
pi        0/5 * * * ?   False     1         Thu, 14 Sep 2017 20:10:00 +0800
```
now output:
```
admindeMacBook-Pro-2:kubectl admin$ ./kubectl get cronjob
NAME      SCHEDULE      SUSPEND   ACTIVE    LAST SCHEDULE   AGE
pi        0/5 * * * ?   False     1         3m              4m
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
thanks
**Release note**:

```release-note
NONE
```
2017-09-23 16:26:49 -07:00
Kubernetes Submit Queue 84dc294a49 Merge pull request #52379 from dixudx/kubectl_describe_hostpathtype
Automatic merge from submit-queue (batch tested with PRs 50294, 50422, 51757, 52379, 52014). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

print HostPathType for kubectl describe

**What this PR does / why we need it**:
Since #46597 has already added `HostPathType` for `HostPath`, we should print it when we describe it.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
@thockin PTAL
/assign @smarterclayton @liggitt @pwittrock

**Release note**:

```release-note
None
```
2017-09-23 11:40:53 -07:00
Kubernetes Submit Queue 8064930037 Merge pull request #51607 from xingzhou/sc-newfield
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Add `ReclaimPolicy` field to `kubectl describe storageclass` output.

Add `ReclaimPolicy` field to `kubectl describe storageclass` output.

PR https://github.com/kubernetes/kubernetes/pull/47987 added `ReclaimPolicy` field to StorageClass.

**Release note**:
```release-note
None
```
2017-09-23 08:09:48 -07:00
Amit Kumar Jaiswal 20d748f465 Fix typo 2017-09-23 20:17:34 +05:30
zhengjiajin f755759997 add age column for storageclass and cronjob test 2017-09-15 17:55:40 +08:00
zhengjiajin 6c84274113 fix kubectl get cronjob lose age info 2017-09-14 20:11:39 +08:00
tianshapjq d698404adc typo in annotations 2017-09-14 16:32:28 +08:00
Di Xu f8211adf42 print HostPathType for kubectl describe 2017-09-13 11:24:48 +08:00
zhengjiajin 23a05f6c23 fix issue(#52244)kubectl describe serviceaccount have redundance null line, we should keep accordance for kubectl describe command 2017-09-13 09:56:26 +08:00
Xing Zhou 957cc8f593 Add `ReclaimPolicy` field to `kubectl describe storageclass` output.
Add `ReclaimPolicy` field to `kubectl describe storageclass` output.
2017-09-07 14:38:58 +08:00
Solly Ross c8690f367b Move consumers of autoscaling/v2alpha1 to v2beta1
This commit updates consumers (mainly the HPA controller, but also the
kubectl printers) of autoscaling/v2alpha1 to autoscaling/v2beta1.
2017-09-05 17:49:30 -04:00
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
Kubernetes Submit Queue fc87bba2dd Merge pull request #51748 from smarterclayton/events_inline
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Simplify describe events table

The describe table for events is not easy to read and violates other
output guidelines. Change to use spaces (we don't use tabs in formal
output for tables). Remove columns that are not normally needed or
available on events.

Example for pods:

```
...
QoS Class:       BestEffort
Node-Selectors:  role=app
Tolerations:     <none>
Events:
  Type     Reason      Age                 From                         Message
  ----     ------      ----                ----                         -------
  Normal   Pulling     1h (x51 over 5h)    kubelet, origin-ci-ig-n-gj0x pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Normal   BackOff     8m (x1274 over 5h)  kubelet, origin-ci-ig-n-gj0x Back-off pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Warning  FailedSync  3m (x1359 over 5h)  kubelet, origin-ci-ig-n-gj0x Error syncing pod
```

Puts the type first (separate important from not), then reason (which is
the most impactful scanning field). Collapses first seen, last seen, and
times into a single field, since most of the time you care about the
last time the event happened, not the first time.

@kubernetes/sig-cli-pr-reviews sorry for the last minute drop, but the usability of this is driving me up the wall and I can't take it anymore. Would like to slip this into 1.8 so that I can debug things without dying a little inside.

Fixes #47715

```release-note
The event table output under `kubectl describe` has been simplified to show only the most essential info.
```
2017-09-03 01:12:12 -07:00
Clayton Coleman 824f04f86a
Simplify describe events table
The describe table for events is not easy to read and violates other
output guidelines. Change to use spaces (we don't use tabs in formal
output for tables). Remove columns that are not normally needed or
available on events.

Example for pods:

```
...
QoS Class:       BestEffort
Node-Selectors:  role=app
Tolerations:     <none>
Events:
  Type     Reason      Age                 From                         Message
  ----     ------      ----                ----                         -------
  Normal   Pulling     1h (x51 over 5h)    kubelet, origin-ci-ig-n-gj0x pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Normal   BackOff     8m (x1274 over 5h)  kubelet, origin-ci-ig-n-gj0x Back-off pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest"
  Warning  FailedSync  3m (x1359 over 5h)  kubelet, origin-ci-ig-n-gj0x Error syncing pod
```

Puts the type first (separate important from not), then reason (which is
the most impactful scanning field). Collapses first seen, last seen, and
times into a single field, since most of the time you care about the
last time the event happened, not the first time.
2017-08-31 19:11:01 -04:00
Antoine Pelisse d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
mtanino f1b9e3e6e3 Fix printISCSIVolumeSource to show kubectl describe properly
Fixes #51635
2017-08-30 12:27:59 -04:00
Maciej Szulik 2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
Kubernetes Submit Queue 2009bbde28 Merge pull request #50953 from zjj2wry/get-pvc
Automatic merge from submit-queue

fix issue(#50937)Fix kubectl get pvc lose volume name

**What this PR does / why we need it**:
closes #50937 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
this should has volumename column.
```
NAME       STATUS    CAPACITY    ACCESS MODES   STORAGECLASS   AGE
myclaim    Bound     pv-gcepd2   5Gi            ROX            slow      35m
myclaim2   Bound     pv-gcepd    5Gi            ROX            slow      25m
```
**Release note**:

```release-note
NONE
```
2017-08-26 23:02:53 -07:00
Kubernetes Submit Queue c241cbe44d Merge pull request #51173 from liggitt/role-printers
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Print multiple node roles, remove kubeadm-specific annotation from kubectl

related to #50010

Follow up to https://github.com/kubernetes/kubernetes/pull/50438 that removes the kubeadm-specific label, makes kubectl role-agnostic, and outputs multiple roles if present
2017-08-26 02:05:39 -07:00
zhangxiaoyu-zidif 25afdbe089 add unit test for describe secret 2017-08-25 09:32:28 +08:00
Huamin Chen 9e65623187 refactor CephFS PV spec to use SecretReference
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 18:49:05 +00:00
Huamin Chen 4525446af2 azure file volume: add secret namespace api
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:49:58 +00:00
Kubernetes Submit Queue 0803d108be Merge pull request #51189 from humblec/iscsi-init-printer
Automatic merge from submit-queue (batch tested with PRs 51193, 51154, 42689, 51189, 51200)

Add initiatorname in iscsi describe printer.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>


```release-note-none
```
2017-08-24 04:38:10 -07:00
Kubernetes Submit Queue 737ded5aeb Merge pull request #51035 from mrogers950/sa-desc-event
Automatic merge from submit-queue (batch tested with PRs 51108, 51035, 50539, 51160, 50947)

Show events when describing service accounts

**What this PR does / why we need it**:
Any events associated with service accounts should appear in the describe output.

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```release-note
Show events when describing service accounts
```
2017-08-24 02:32:06 -07:00
Jordan Liggitt 10687447cb
Print multiple node roles, remove kubeadm-specific annotation from kubectl 2017-08-23 09:34:41 -04:00
Humble Chirammal ddc99590a2 Add initiatorname in iscsi describe printer.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-08-23 16:13:52 +05:30
Kubernetes Submit Queue 601b6d3e02 Merge pull request #50438 from dixudx/kubectl_show_node_roles
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

kubectl show node role if defined

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50010

**Special notes for your reviewer**:
/assign @justinsb @luxas @jbeda @philips
/cc @qrevel

**Release note**:

```release-note
kubectl show node role if defined
```
2017-08-22 19:45:37 -07:00
Matt Rogers c42c43a13f Show events when describing service accounts
Signed-off-by: Matt Rogers <mrogers@redhat.com>
2017-08-21 13:54:12 -04:00
zhengjiajin 1a1b940ecb fix issue(#50937)Fix kubectl get pvc lose volume name 2017-08-19 17:02:58 +08:00
zhangxiaoyu-zidif 57c5d58946 fix-review 2017-08-19 15:30:36 +08:00
Dr. Stefan Schimanski b0b5de6eaf Port internal extensions/Network* to networking.k8s.io API group 2017-08-15 11:56:46 +02:00
Di Xu 568d809b24 kubectl show node role if defined 2017-08-15 17:40:06 +08:00
Kubernetes Submit Queue 17fa37292f Merge pull request #49129 from justinsb/revert_48056
Automatic merge from submit-queue (batch tested with PRs 49129, 50436, 50417, 50553, 47587)

Revert "Remove old node role label that is not used by kubeadm"

Revert the commit that removed printing of node roles from kubectl.

It sounds like we also need to update the labels we inspect, as these were previously removed.  But starting with a clean revert.

Issue #49124

```release-note
NONE
```
2017-08-14 19:48:56 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Kubernetes Submit Queue 3e8a25e818 Merge pull request #50008 from atlassian/meta-controller-ref
Automatic merge from submit-queue

Migrate to controller references helpers in meta/v1

**What this PR does / why we need it**:
This is a follow up for #48319 that migrates all method usages to new methods in meta/v1.

**Special notes for your reviewer**:
Looking at each commit individually might be easier.

**Release note**:
```release-note
NONE
```
/sig api-machinery
/kind cleanup
2017-08-10 17:07:30 -07:00
Kubernetes Submit Queue 592de1d0af Merge pull request #49206 from zhangxiaoyu-zidif/add-unittest-print-for-pdb
Automatic merge from submit-queue (batch tested with PRs 50418, 49830, 49206, 49061, 49912)

Add UT case for pdb printer

**What this PR does / why we need it**:
Add UT case for pdb printer

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE
**Special notes for your reviewer**:
NONE
**Release note**:

```release-note
NONE
```
2017-08-09 22:07:18 -07:00
Kubernetes Submit Queue 362c4acc54 Merge pull request #48655 from FengyunPan/remove-duplicate-item
Automatic merge from submit-queue

Filter duplicate ips or hostnames for ingress

Fix issue: #48654

**Release note**:
```release-note
NONE
```
2017-08-08 00:52:04 -07:00
Dr. Stefan Schimanski 3b310d8989 Update generated code 2017-08-06 15:32:28 +02:00
Dr. Stefan Schimanski 83895daed1 Fix printer hack to get a versioned client 2017-08-06 15:30:13 +02:00
Mikhail Mazurskiy b28a83a4cf
Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
Kubernetes Submit Queue 9a277fba7d Merge pull request #50071 from xiangpengzhao/fix-des-svc
Automatic merge from submit-queue

Display healthcheck nodeport and other fields in describe service

**What this PR does / why we need it**:
Some fields such as `HealthCheckNodePort` are not displayed currently. This PR fixes it.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Update: found this when tracing #49999

**Special notes for your reviewer**:
/sig cli network

**Release note**:

```release-note
NONE
```
2017-08-05 20:53:19 -07:00
xiangpengzhao ad8506c3c5 Display healthcheck nodeport and other fields in describe service 2017-08-04 13:01:42 +08:00
Haoran Wang ecb6af2c3d address comments 2017-08-03 10:44:02 +08:00
Haoran Wang 17c4cff906 fix secret printer 2017-08-03 10:35:07 +08:00
Haoran Wang 3d6e2b57a9 Add some more table printer 2017-08-03 10:35:07 +08:00
Haoran Wang 07dc45ea4c Add table printer for csr 2017-08-03 10:35:07 +08:00
Haoran Wang 623efb4e9c Add table printer for rolebinding clusterRoleBinding 2017-08-03 10:35:07 +08:00
Haoran Wang cd91fc53cd Add table printer for cluster 2017-08-03 10:35:06 +08:00
Haoran Wang 241f30b969 Add table printer for psp 2017-08-03 10:35:06 +08:00
Haoran Wang c4fc7168d8 Add table printer for configMap 2017-08-03 10:35:06 +08:00
Haoran Wang 69c5298886 Add table printer for hpa 2017-08-03 10:35:06 +08:00
Haoran Wang 143cc77976 Add table printer for 3rdpartyResource and deployment 2017-08-03 10:35:06 +08:00
Haoran Wang d3d18b5f51 Add componentStatus table printer 2017-08-03 10:35:06 +08:00
Haoran Wang c1ff87996a Add persistentVolumeClaim table printer 2017-08-03 10:35:06 +08:00
Haoran Wang 11b531b739 Add persistentVolume table printer 2017-08-03 10:35:06 +08:00
Haoran Wang 6f89391354 Add serviceAccount table printer 2017-08-03 10:35:06 +08:00
Haoran Wang 703af6964c Add secret table printer 2017-08-03 10:35:06 +08:00
Haoran Wang 9543d81bf6 Add namespace table printer 2017-08-03 10:35:06 +08:00
Haoran Wang 0f69f74c31 Add Event table printer 2017-08-03 10:35:06 +08:00
Kubernetes Submit Queue d8205661b7 Merge pull request #49264 from zhangxiaoyu-zidif/add-test-for-pdb-describer
Automatic merge from submit-queue (batch tested with PRs 49533, 49264)

Add test items for pdb describe

**What this PR does / why we need it**:
Add test items for pdb describe

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE
**Special notes for your reviewer**:
ref: #49362 

**Release note**:

```release-note
NONE
```
2017-07-30 09:39:55 -07:00
FengyunPan 11e8f3a88d Filter duplicate ips or hostnames for ingress
Fix issue: #48654
2017-07-29 11:23:23 +08:00
Kubernetes Submit Queue b3c6da0ece Merge pull request #45813 from xilabao/add-psp-in-kubectl-describe
Automatic merge from submit-queue (batch tested with PRs 45813, 49594, 49443, 49167, 47539)

add podsecuritypolicy in kubectl describe command

**What this PR does / why we need it**:
Describe all fields of podsecuritypolicy
```
# ./cluster/kubectl.sh describe psp restricted
Name:	restricted

Settings:
  Allow Privileged:				false
  Default Add Capabilities:			<none>
  Required Drop Capabilities:			<none>
  Allowed Capabilities:				<none>
  Allowed Volume Types:				emptyDir,secret,downwardAPI,configMap,persistentVolumeClaim,projected
  Allow Host Network:				false
  Allow Host Ports:				<none>
  Allow Host PID:				false
  Allow Host IPC:				false
  Read Only Root Filesystem:			false
  SELinux Context Strategy: RunAsAny		
    User:					<none>
    Role:					<none>
    Type:					<none>
    Level:					<none>
  Run As User Strategy: MustRunAsNonRoot	
    Ranges:					<none>
  FSGroup Strategy: RunAsAny			
    Ranges:					<none>
  Supplemental Groups Strategy: RunAsAny	
    Ranges:					<none>
```

**Which issue this PR fixes**: fixes #43757

**Special notes for your reviewer**:

**Release note**:
```release-note
kubectl describe podsecuritypolicy describes all fields.
```
2017-07-28 07:22:32 -07:00
xilabao 190b5f289c add podsecuritypolicy in kubectl describe command 2017-07-28 16:52:24 +08:00
Justin Santa Barbara 81b0fa7b29 Revert "Remove old node role label that is not used by kubeadm"
This reverts commit e25a5b1546.
2017-07-28 02:26:43 -04:00
Kubernetes Submit Queue d4897e875b Merge pull request #47160 from shashidharatd/fed-internalclientset
Automatic merge from submit-queue (batch tested with PRs 46913, 48910, 48858, 47160)

federation: Stop using and remove federation internalclientset

**What this PR does / why we need it**:
This probably a left over job. We should not be using the internal clientset and instead be using versioned ones as described in #29934

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

```release-note
NONE
```

/assign @nikhiljindal 
/cc @kubernetes/sig-federation-misc
2017-07-25 23:00:38 -07:00
Kubernetes Submit Queue 4399fb2b87 Merge pull request #49071 from foxish/foxish-api
Automatic merge from submit-queue (batch tested with PRs 43443, 46193, 49071, 47252)

Add v1beta2.DaemonSet

Depends on https://github.com/kubernetes/kubernetes/pull/48746
Partly implements https://github.com/kubernetes/kubernetes/issues/49135

```release-note
Adding type apps/v1beta2.DaemonSet
```
2017-07-25 21:52:50 -07:00
shashidharatd d51ae181a5 Auto generated files 2017-07-26 06:22:30 +05:30
shashidharatd dbbcb568d4 Converted usage of federation internal clientset to versioned clientset 2017-07-26 06:20:08 +05:30
Kubernetes Submit Queue bb48546658 Merge pull request #49359 from wanghaoran1988/convert_to_table_printer
Automatic merge from submit-queue

Add some table printer

**What this PR does / why we need it**:
Add table printer for Service resource

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
related to https://github.com/kubernetes/kubernetes/issues/48820

**Special notes for your reviewer**:

**Release note**:

```
None
```
2017-07-25 13:08:01 -07:00
foxish ca38850ab1 DS: kubectl changes 2017-07-25 11:47:57 -07:00
Kubernetes Submit Queue 393b1228c9 Merge pull request #45431 from DirectXMan12/feature/fake-dynamic-client
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

[client-go] Fake Dynamic Client

This commit converts `"k8s.io/client-go/dynamic".Client` to an interface, and implements fake versions of both `ClientPool` and `Client`.  This allows components which make uses of these clients to be tested in the same way that clientset-based components can be tested, using the standard `testing.Fake` machinery.

**Release note**:
```release-note
NONE
```
2017-07-25 11:06:49 -07:00
zhangxiaoyu-zidif 1292827bb0 add namespace test 2017-07-25 15:54:11 +08:00
Kubernetes Submit Queue 7f1d9382ec Merge pull request #48846 from dashpole/remove_ood
Automatic merge from submit-queue

Remove flags low-diskspace-threshold-mb and outofdisk-transition-frequency

issue: #48843

This removes two flags replaced by the eviction manager.  These have been depreciated for two releases, which I believe correctly follows the kubernetes depreciation guidelines.

```release-note
Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard
```

cc @mtaufen since I am changing kubelet flags
cc @vishh @derekwaynecarr 
/sig node
2017-07-24 23:05:50 -07:00
Haoran Wang 4d5417ad7f Add Node table printer 2017-07-25 12:20:50 +08:00
Haoran Wang dc5a8ec829 Add Endpoint table printer 2017-07-25 12:16:39 +08:00
Haoran Wang 65a6479521 Add statefulset table printer 2017-07-25 12:16:31 +08:00
Kubernetes Submit Queue f08e530257 Merge pull request #49362 from zhangxiaoyu-zidif/fix-pdb-describer
Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274)

Add namespace for describe pdb

**What this PR does / why we need it**:
add namespace for describe pdb

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes https://github.com/kubernetes/kubernetes/issues/49363
**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-24 20:39:20 -07:00
Haoran Wang d114045577 Add ingress table printer 2017-07-25 10:05:10 +08:00
Haoran Wang 9bd1529a98 Add Service table printer 2017-07-25 07:12:45 +08:00
Kubernetes Submit Queue b940d14261 Merge pull request #46210 from xiangpengzhao/print-volume-info
Automatic merge from submit-queue

Add AzureFile,FC,Flex,Flocker volume source to describe printer.

**What this PR does / why we need it**:
Display other volume sources in describe printer.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
Also need CephFS. It will be added in #46124 

/cc @rootfs 

_ADD: all the volume source printers are sorted out of order. I'd like to sort them alphabetically in order to be more readable in another PR after this PR merged. WDYT?_ 

**Release note**:

```release-note
NONE
```
2017-07-21 16:45:37 -07:00
Solly Ross f78d61e7c2 [client-go] Add dynamic.Interface
This adds an interface form of dynamic.Client and
dynamic.ResourceClient, making those two follow the general client
conventions: `Interface` is an interface, and `Client` is the concrete
implementation.  `ClientPool` retains it's interface status.

This allows us to create a fake implemenation of dyanmic.Interface,
dynamic.ResourceInterface, and dynamic.ClientPool for testing.
2017-07-21 14:24:06 -04:00
zhangxiaoyu-zidif 74d2aa4dee add namespace for describe pdb 2017-07-21 16:47:37 +08:00
David Ashpole 7a23f8b018 remove deprecated flags LowDiskSpaceThresholdMB and OutOfDiskTransitionFrequency 2017-07-20 13:23:13 -07:00
Kubernetes Submit Queue 8d26afa8a6 Merge pull request #48377 from bsalamat/priority_class
Automatic merge from submit-queue

Add PriorityClass API object under new "scheduling" API group

**What this PR does / why we need it**: This PR is a part of a series of PRs to add pod priority to Kubernetes. This PR adds a new API group called "scheduling" with a new API object called "PriorityClass". PriorityClass maps the string value of priority to its integer value.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**: Given the size of this PR, I will add the admission controller for the PriorityClass in a separate PR.

**Release note**:

```release-note
Add PriorityClass API object under new "scheduling" API group
```

ref/ #47604
ref/ #48646
2017-07-19 19:04:29 -07:00
zhangxiaoyu-zidif 8e0cc7ede2 add test case for pdb printer 2017-07-19 22:22:01 +08:00
xiangpengzhao abc7c4cf10 Add AzureFile,Flex,Flocker volume source to describe printer. 2017-07-19 10:42:27 +08:00
Kubernetes Submit Queue fc1d2b3be7 Merge pull request #48256 from xiangpengzhao/move-pkg-util
Automatic merge from submit-queue (batch tested with PRs 48481, 48256)

Refactor: pkg/util into sub-pkgs

**What this PR does / why we need it**:
- move code in pkg/util into sub-pkgs
- delete some unused funcs

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #15634

**Special notes for your reviewer**:
This is the final work of #15634. It will close that issue.
/cc @thockin 

**Release note**:

```release-note
NONE
```
2017-07-18 18:19:19 -07:00
Bobby (Babak) Salamat e827e1ba87 autogenerated files 2017-07-18 17:47:57 -07:00
Bobby Salamat 33e6a476ba Add PriorityClass API
Add PriorityClass to pkg/registry

Add PriorityClass to pkg/master/master.go

Add PriorityClass to import_know_versions.go

Update linted packages

minor fix
2017-07-18 17:47:57 -07:00
Kubernetes Submit Queue 89a1ce2c1f Merge pull request #48807 from jsafrane/fc-describe
Automatic merge from submit-queue (batch tested with PRs 46094, 48544, 48807, 49102, 44174)

Implement kubectl describe <fibre-channel PV>

kubectl did not show any details about Fibre Channel volumes, someone just forgot to implement it.

Tested with:

```shell
$ kubectl create -f - <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:
  name: myfc
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  fc:
       targetWWNs: ['500a0982991b8dc5', '500a0982891b8dc5']
       lun: 2
       fsType: ext4
       readOnly: true
EOF

$ kubectl describe pv myfc
Name:		myfc
Labels:		<none>
Annotations:	<none>
StorageClass:	
Status:		Available
Claim:		
Reclaim Policy:	Delete
Access Modes:	RWO
Capacity:	100Gi
Message:	
Source:
    Type:	FC (a Fibre Channel disk)
    TargetWWNs:	500a0982991b8dc5, 500a0982891b8dc5
    LUN:	2
    FSType:	ext4
    ReadOnly:	true
Events:		<none>
```

```release-note
NONE
```
@kubernetes/sig-cli-pr-reviews
2017-07-18 11:20:54 -07:00
Dr. Stefan Schimanski 39d95b9b06 deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
2017-07-18 09:28:47 +02:00
xiangpengzhao 01daf707c5 Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
allencloud 389cd57014 remove duplicated word file in error
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-07-14 18:01:51 +08:00
Jan Safranek 09e241294f Implement kubectl describe <fibre-channel PV> 2017-07-12 12:34:43 +02:00
Kubernetes Submit Queue a9aabd76e7 Merge pull request #46017 from xilabao/fix-print-of-generic-resources
Automatic merge from submit-queue (batch tested with PRs 44412, 44810, 47130, 46017, 47829)

fix self link error of generic resources in describe command

**What this PR does / why we need it**:
fix Self Link error
```
./cluster/kubectl.sh describe clusterrole system:controller:ttl-controller
Name:		system:controller:ttl-controller
Namespace:	
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
API Version:	rbac.authorization.k8s.io/v1alpha1
Kind:		ClusterRole
Metadata:
  Creation Timestamp:	2017-05-18T06:42:02Z
  Resource Version:	80
  Self Link:		/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/system%!A(MISSING)controller%!A(MISSING)ttl-controller
  UID:			19a705a4-3b95-11e7-9d55-7427ea6f0fe3
Rules:
  API Groups:
    
  Resources:
    nodes
  Verbs:
    list
    patch
    update
    watch
  API Groups:
    
  Resources:
    events
  Verbs:
    create
    patch
    update
Events:	<none>
```

**Which issue this PR fixes**: fixes #48743

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-11 20:00:23 -07:00
deads2k 0801ded425 remove dead code 2017-07-07 09:12:29 -04:00
Kubernetes Submit Queue 1108738200 Merge pull request #48033 from smarterclayton/generic_printer
Automatic merge from submit-queue (batch tested with PRs 45467, 48091, 48033, 48498)

Refactor and simplify generic printer for unknown objects

The first two commits are part of other PRs

@kubernetes/sig-cli-pr-reviews part of the general refactoring for server side print
2017-07-05 12:37:33 -07:00
Kubernetes Submit Queue e16b59aa0a Merge pull request #45467 from ddysher/kubectl-describe-controllerRef
Automatic merge from submit-queue

Fix kubectl describe for pods with controllerRef

**What this PR does / why we need it**:

kubectl describe doesn't take controllerRef into consideration, resulting confusing result. e.g. if we have two replicaset with the same selector, one with 1 replica and the other 2 replicase, then both replicaset will show 3 running pods.

```sh
$ kubectl describe rs replicaset-2
Name:           replicaset-2      
Namespace:      default
Selector:       environment=prod
Labels:         environment=prod
Annotations:    <none>
Replicas:       2 current / 2 desired
Pods Status:    3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:       environment=prod
  Containers:
   created-from-replicaset:
    Image:              nginx
    Port:               
    Environment:        <none>
    Mounts:             <none>
  Volumes:              <none>
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                    -------------   --------        ------                  -------
  5m            5m              1       replicaset-controller                   Normal          SuccessfulCreate        Created pod: replicaset-2-39szb
  5m            5m              1       replicaset-controller                   Normal          SuccessfulCreate        Created pod: replicaset-2-470jr
```


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

xref #24946

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix kubectl describe for pods with controllerRef 
```
2017-07-05 12:25:49 -07:00
Kubernetes Submit Queue e5419a56db Merge pull request #47162 from FengyunPan/display-none
Automatic merge from submit-queue (batch tested with PRs 47162, 48444, 48445)

Fix output extra comma

/# kubectl get service
NAME                     CLUSTER-IP       EXTERNAL-IP               PORT(S)          AGE
nginx-service-test       10.200.6.109     _**,80.11.12.10**_              8000:31637/TCP   6s
**(output a extra comma)**
except: 
nginx-service-test       10.200.6.109     _**80.11.12.10**_              8000:31637/TCP   6s

/# cat lb.yaml 
apiVersion: v1 
kind: Service 
metadata: 
  name: nginx-service-lb3
spec: 
  ports: 
    - port: 8000
      targetPort: 80 
      protocol: TCP 
  type: LoadBalancer
  selector: 
    name: nginx
  externalIPs: 
    - 80.11.12.10
    - 1.2.3.6
/# kubectl create -f lb.yaml
2017-07-05 06:39:27 -07:00
Clayton Coleman 6bd0c38908
Add a new default printer handler for HumanReadable
Refactors and removes the need for the more complex old code,
temporarily limits what output is shown for truly unknown objects (a
follow up change will allow server side handling and generic fallback),
and removes all of the generic printers in favor of a single code path.
2017-07-05 00:31:41 -04:00
Deyuan Deng c73b535d16 Fix kubectl describe for controllerRef 2017-07-01 18:45:23 +08:00
Kubernetes Submit Queue 5eccc7ae80 Merge pull request #48056 from luxas/kubeadm_remove_old_label
Automatic merge from submit-queue

Remove old node role label that is not used by kubeadm

**What this PR does / why we need it**:
This label hasn't been used by kubeadm since v1.5.
v1.5 support was dropped when v1.6 arrived due to a potential security flaw and the earlier alpha status.
So this label hasn't been used for around three months.
It makes sense to remove it in time for v1.8, could already have been done for v1.7

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-06-30 22:06:23 -07:00
Clayton Coleman 2f211b8870
Move DaemonSet to table printer 2017-06-26 20:58:02 -04:00
Clayton Coleman bdd3116c09
Move more printers to TablePrinter 2017-06-26 11:38:36 -04:00
Lucas Käldström e25a5b1546
Remove old node role label that is not used by kubeadm 2017-06-26 14:46:15 +03:00
FengyunPan b9c1848fbd Fix output extra comma
When running 'kubectl get service', I get a extra comma in result:
'EXTERNAL-IP:,172.16.0.12', but except: 'EXTERNAL-IP:172.16.0.12'.
2017-06-24 00:10:33 +08:00
FengyunPan a97a9f9dd5 Display <none> for clusterIP and port when service is ExternalName 2017-06-23 23:55:08 +08:00
Kubernetes Submit Queue ae9ca46927 Merge pull request #47694 from FengyunPan/display-service-type
Automatic merge from submit-queue (batch tested with PRs 47694, 47772, 47783, 47803, 47673)

Output TYPE for getting service

**What this PR does / why we need it**:
Now service already supported 4 ServiceTypes, ServiceTypes is
friendly to distinguish services, so outputing service type better
when running 'kubectl get service'.

**Release note**:
```release-note
  NONE
```
2017-06-23 08:29:23 -07:00
Kubernetes Submit Queue 8679677e87 Merge pull request #47579 from wanghaoran1988/fix_43322
Automatic merge from submit-queue (batch tested with PRs 47958, 46261, 46667, 47709, 47579)

Clean up Deployment overlap annotation code

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43322

**Special notes for your reviewer**:

**Release note**:

```
None
```
2017-06-23 07:21:36 -07:00
Kubernetes Submit Queue b1ac562918 Merge pull request #44086 from NickrenREN/sc-type
Automatic merge from submit-queue (batch tested with PRs 47915, 47856, 44086, 47575, 47475)

Change second StorageClass Column to provisioner

Some provisioners have key-value pairs in parameters map which key is type, here TYPE in StorageClass columns may be confused.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#storageclasses

**Release note**:

```release-note
NONE
```
2017-06-23 04:06:23 -07:00
Kubernetes Submit Queue 4a1d95ef57 Merge pull request #46646 from rickypai/rpai/add_container_runtime_version_to_node_wide_printer
Automatic merge from submit-queue (batch tested with PRs 47403, 46646, 46906, 46527, 46792)

add ContainerRuntimeVersion to `kubectl get nodes -o=wide` output

**What this PR does / why we need it**: adds container runtime version to `kubectl get nodes -o=wide` output as a way to surface more node-level information

When upgrading to a new container runtime version (docker 1.11 -> docker 1.12) or when experimenting with a different container runtime version (experimenting with rkt in a docker cluster), it's useful for cluster operators to see which nodes are running which container runtime version. `kubectl get nodes -o=wide` already provides kernel and OS version, and I believe adding container runtime version would be good.

**Release note**:
```release-note
container runtime version has been added to the output of `kubectl get nodes -o=wide` as `CONTAINER-RUNTIME`
```
2017-06-23 02:59:25 -07:00
Kubernetes Submit Queue c76c145d37 Merge pull request #46280 from zjj2wry/print-rs
Automatic merge from submit-queue (batch tested with PRs 47227, 47119, 46280, 47414, 46696)

Improve code coverage for pkg/printer

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-22 23:59:21 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue a8968810fd Merge pull request #47380 from kevin-wangzefeng/pod-tolerations-with-no-value
Automatic merge from submit-queue

hide operator when describe pod with empty value tolerations

**What this PR does / why we need it**:
The tolerations printing in `kubectl descirbe pod` is not correct when toleration.value is empty, this PR is to fix it.

Before: 
```
Tolerations:	node.alpha.kubernetes.io/notReady=:Exists:NoExecute for 300s
		node.alpha.kubernetes.io/unreachable=:Exists:NoExecute for 300s
```
After:
```
Tolerations:	node.alpha.kubernetes.io/notReady:NoExecute for 300s
		node.alpha.kubernetes.io/unreachable:NoExecute for 300s
```

Also updated tests to cover all possible cases of describing pod with tolerations. See changes in of `TestDescribePodTolerations()` in `describe_test.go`

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-22 08:02:29 -07:00
FengyunPan f01f9a9035 Output TYPE for getting service
Now service already supported 4 ServiceTypes, ServiceTypes is
friendly to distinguish services, so outputing service type better
when running 'kubectl get service'.
2017-06-18 12:19:57 +08:00
Haoran Wang f732e4baae Clean up Deployment overlap annotation code 2017-06-16 14:20:44 +08:00
Klaus Ma d3efbfcd33 Fixed PVC's capacity in description. 2017-06-15 11:56:46 +08:00
Kevin c6c9e9b4e0 hide operator when describe pod with empty value tolerations 2017-06-12 16:17:31 -07:00
Kubernetes Submit Queue 9df40c3661 Merge pull request #42156 from croomes/storageos
Automatic merge from submit-queue

StorageOS Volume Plugin

**What this PR does / why we need it**:
This PR adds a new volume plugin for StorageOS volumes.  StorageOS runs as a container on Kubelet nodes, aggregating local or attached storage and making its capacity available to all nodes within the cluster. More information at http://storageos.com.

The StorageOS plugin supports:

1. Dynamic Provisioning using Storage Classes
2. Persistent Volumes and Persistent Volume Claims.

**Which issue this PR fixes**
A feature request has been created:
https://github.com/kubernetes/features/issues/190

This isn't on the schedule for 1.6 as I wasn't sure when it would be ready.  We intend to make the StorageOS container openly available within the 1.6 lifetime.

**Special notes for your reviewer**:

Separate commits for feature and godep changes.

**Release note**:
```release-note
StorageOS Volume Driver
[StorageOS](http://www.storageos.com) can be used as a storage provider for Kubernetes.  With StorageOS, capacity from local or attached storage is pooled across the cluster, providing converged infrastructure for cloud-native applications. 
```
2017-06-09 18:25:04 -07:00
Dr. Stefan Schimanski 30668b24fb client-go: GetOptions for dynamic client 2017-06-09 18:04:17 +02:00
Simon Croome 5e2503e71f Add StorageOS volume plugin 2017-06-09 13:19:27 +01:00
Kubernetes Submit Queue 41f6f9ddbb Merge pull request #45877 from zhangxiaoyu-zidif/add-ut-for-test-podlist
Automatic merge from submit-queue (batch tested with PRs 45877, 46846, 46630, 46087, 47003)

add Unit Test for PodList Printer

Signed-off-by: zhangxiaoyu-zidif <zhang.xiaoyu33@zte.com.cn>



**What this PR does / why we need it**:
add Unit Test for PodList Printer

**Release note**:

```release-note
NONE
```
2017-06-07 17:55:40 -07:00
Kubernetes Submit Queue 49866b864c Merge pull request #47013 from smarterclayton/fix_printer
Automatic merge from submit-queue (batch tested with PRs 47024, 47050, 47086, 47081, 47013)

Wrap HumanReadablePrinter in tab output unless explicitly asked not to

`kubectl get` was not properly aligning its output due to #40848 

Fixes an accidental regression. In general, we should not accept an incoming tabwriter and instead manage at a higher level. Fix the bug and add a comment re: future refactoring.
2017-06-07 16:53:47 -07:00
Sunil Arora f768a63fb0 Get cmd uses print-column extn from Openapi schema
Get command now uses metadata x-kubernetes-print-columns, if present, in Openapi schema
to format output for a resource. This functionality is guarded by a boolean
flag 'use-openapi-print-columns'.
2017-06-06 13:30:24 -07:00
Clayton Coleman b1abedbc64
Wrap HumanReadablePrinter in tab output unless explicitly asked not to
Fixes an accidental regression. In general, we should not accept an
incoming tabwriter and instead manage at a higher level. Fix the bug and
add a comment re: future refactoring.
2017-06-05 22:06:38 -04:00
Solly Ross 53dccdbb43 Update kubectl to display HPA status conditions
This commit updates `kubectl describe` to display the new HPA
status conditions.  This should make it easier for users to discern
the current state of the HPA.
2017-06-05 11:21:31 -04:00
zhangxiaoyu-zidif 3ef73bdb55 Add unittest for PodList 2017-06-05 17:56:53 +08:00
Kubernetes Submit Queue 348bf1e032 Merge pull request #46627 from deads2k/api-12-labels
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

move labels to components which own the APIs

During the apimachinery split in 1.6, we accidentally moved several label APIs into apimachinery.  They don't belong there, since the individual APIs are not general machinery concerns, but instead are the concern of particular components: most commonly the kubelet.  This pull moves the labels into their owning components and out of API machinery.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @kubernetes/api-approvers 
@derekwaynecarr  since most of these are related to the kubelet
2017-06-02 23:37:38 -07:00
Kubernetes Submit Queue 2629bf79f2 Merge pull request #46265 from waseem/printers-genericity
Automatic merge from submit-queue (batch tested with PRs 41563, 45251, 46265, 46462, 46721)

Denote if a printer is generic.

This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.
2017-06-02 19:53:40 -07:00
Kubernetes Submit Queue 97a5d37841 Merge pull request #40848 from smarterclayton/serverside_get
Automatic merge from submit-queue (batch tested with PRs 46432, 46701, 46326, 40848, 46396)

Add a server side Get operation

Implement proposal kubernetes/community#363

```release-note
The Kubernetes API supports retrieving tabular output for API resources via a new mime-type `application/json;as=Table;v=v1alpha1;g=meta.k8s.io`.  The returned object (if the server supports it) will be of type `meta.k8s.io/v1alpha1` with `Table`, and contain column and row information related to the resource.  Each row will contain information about the resource - by default it will be the object metadata, but callers can add the `?includeObject=Object` query parameter and receive the full object.  In the future kubectl will use this to retrieve the results of `kubectl get`.
```
2017-06-02 11:47:11 -07:00
Kubernetes Submit Queue f5bcd98d5e Merge pull request #46326 from xilabao/add-role-to-describe-command
Automatic merge from submit-queue (batch tested with PRs 46432, 46701, 46326, 40848, 46396)

add role/clusterrole to describe.go

**What this PR does / why we need it**:
```
# ./cluster/kubectl.sh describe clusterrole system:kube-scheduler 
Name:		system:kube-scheduler
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
PolicyRule:
  Resources			Non-Resource URLs	Resource Names		Verbs
  ---------			-----------------	--------------		-----
  bindings			[]			[]			[create]
  endpoints			[]			[]			[create]
  endpoints			[]			[kube-scheduler]	[delete]
  endpoints			[]			[kube-scheduler]	[get]
  endpoints			[]			[kube-scheduler]	[patch]
  endpoints			[]			[kube-scheduler]	[update]
  events			[]			[]			[create patch update]
  nodes				[]			[]			[get list watch]
  persistentvolumeclaims	[]			[]			[get list watch]
  persistentvolumes		[]			[]			[get list watch]
  pods				[]			[]			[get list watch]
  pods/binding			[]			[]			[create]
  pods/status			[]			[]			[update]
  replicasets.extensions	[]			[]			[get list watch]
  replicationcontrollers	[]			[]			[get list watch]
  services			[]			[]			[get list watch]
  statefulsets.apps		[]			[]			[get list watch]

```
**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-02 11:47:07 -07:00
zhengjiajin 41ccc15796 Improve code coverage for pkg/printer 2017-06-02 10:07:30 +08:00
Ricky Pai 8c0c7626eb add ContainerRuntimeVersion to `kubectl get nodes -o=wide` output 2017-06-01 16:52:04 -07:00
xilabao bfd184274b add role/clusterrole to describe.go 2017-06-01 14:14:10 +08:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Waseem Ahmad 8442a118ea Denote if a printer is generic.
This fixes #38779.

This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.

Please see #38779 and #38112 for complete context.

Add comment explaining adding handlers to printers.HumanReadablePrinter
also remove an unnecessary conversion of printers.HumanReadablePrinter
to printers.ResourcePrinter.
2017-05-31 13:02:23 +05:30
Janet Kuo 80af0012f5 Implement kubectl get controllerrevisions 2017-05-30 18:15:26 -07:00
Kubernetes Submit Queue 8caffc300e Merge pull request #45909 from zhangxiaoyu-zidif/add-unittest-for-configmap
Automatic merge from submit-queue (batch tested with PRs 45488, 45335, 45909, 46074, 46615)

Add Unit Test:describe configmap

**What this PR does / why we need it**:
Add Unit Test:describe configmap

**Release note**:

```release-note
NONE
```
2017-05-30 03:46:59 -07:00
Clayton Coleman 7ce63eb608
Refactor printers to support rendering as a Table
Return tables from the server.
2017-05-29 18:30:10 -04:00
Dan Winship 0923f860f1 Regenerate files 2017-05-28 10:11:02 -04:00
Dan Winship 0683e55fc1 Add networking.k8s.io v1 API, with NetworkPolicy 2017-05-28 10:11:01 -04:00
Kubernetes Submit Queue 25aa600360 Merge pull request #46178 from zjj2wry/des_rq
Automatic merge from submit-queue

add test in descibe resourcequota

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-26 07:05:54 -07:00
xilabao 9fe2ef54ba add policy_compact to rbac validation 2017-05-26 13:22:38 +08:00
Kubernetes Submit Queue b642ae2c18 Merge pull request #46124 from humblec/cephfs-vol-source
Automatic merge from submit-queue (batch tested with PRs 46124, 46434, 46089, 45589, 46045)

Add CephFS volume source to describe printer.
2017-05-25 21:39:56 -07:00
zhengjiajin fe44830a31 add test in descibe resourcequota 2017-05-24 10:12:37 +08:00
Humble Chirammal 8700776d26 Add CephFS volume source to describe printer.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-23 20:27:00 +05:30
Anirudh 078f9566d9 PDB MaxUnavailable: kubectl changes 2017-05-23 07:18:44 -07:00
Kubernetes Submit Queue 455e9fff09 Merge pull request #46176 from vmware/vSphereStoragePolicySupport
Automatic merge from submit-queue

vSphere storage policy support for dynamic volume provisioning

Till now, vSphere cloud provider provides support to configure persistent volume with VSAN storage capabilities - kubernetes#42974. Right now this only works with VSAN.

Also there might be other use cases:

- The user might need a way to configure a policy on other datastores like VMFS, NFS etc.
- Use Storage IO control, VMCrypt policies for a persistent disk.

We can achieve about 2 use cases by using existing storage policies which are already created on vCenter using the Storage Policy Based Management service. The user will specify the SPBM policy ID as part of dynamic provisioning 

- resultant persistent volume will have the policy configured with it. 
- The persistent volume will be created on the compatible datastore that satisfies the storage policy requirements. 
- If there are multiple compatible datastores, the datastore with the max free space would be chosen by default.
- If the user specifies the datastore along with the storage policy ID, the volume will created on this datastore if its compatible. In case if the user specified datastore is incompatible, it would error out the reasons for incompatibility to the user.
- Also, the user will be able to see the associations of persistent volume object with the policy on the vCenter once the volume is attached to the node.

For instance in the below example, the volume will created on a compatible datastore with max free space that satisfies the "Gold" storage policy requirements.

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
       name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
      diskformat: zeroedthick
      storagepolicyName: Gold
```

For instance in the below example, the vSphere CP checks if "VSANDatastore" is compatible with "Gold" storage policy requirements. If yes, volume will be provisioned on "VSANDatastore" else it will error that "VSANDatastore" is not compatible with the exact reason for failure.

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
       name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
      diskformat: zeroedthick
      storagepolicyName: Gold
      datastore: VSANDatastore
```

As a part of this change, 4 commits have been added to this PR.

1. Vendor changes for vmware/govmomi
2. Changes to the VsphereVirtualDiskVolumeSource in the Kubernetes API. Added 2 additional fields StoragePolicyName, StoragePolicyID
3. Swagger and Open spec API changes.
4. vSphere Cloud Provider changes to implement the storage policy support.

**Release note**:


```release-note
vSphere cloud provider: vSphere Storage policy Support for dynamic volume provisioning
```
2017-05-22 23:41:10 -07:00
Kubernetes Submit Queue e823e60bbf Merge pull request #46022 from xilabao/add-rolebinding-to-describe-command
Automatic merge from submit-queue

add rolebinding/clusterrolebinding to describe.go

**What this PR does / why we need it**:

```
./cluster/kubectl.sh describe clusterrolebinding system:kube-dns
Name:		system:kube-dns
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
Role:
  Kind:	ClusterRole
  Name:	system:kube-dns
Subjects:
  Kind			Name		Namespace
  ----			----		---------
  ServiceAccount	kube-dns	kube-system
```

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-22 19:59:20 -07:00
System Administrator 83520a7470 Kubernetes core API changes for vSphere 2017-05-22 19:43:29 -07:00
Kubernetes Submit Queue f6b3d083b7 Merge pull request #44640 from msau42/local-pv-api
Automatic merge from submit-queue

LocalStorage api

**What this PR does / why we need it**:
API changes to support persistent local volumes, as described [here](https://github.com/kubernetes/community/pull/306)

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Part of #43640

**Special notes for your reviewer**:
There were a few items I was concerned about.  Will add review comments in those places.

**Release note**:

NONE

Note will be added in subsequent PR with the volume plugin changes
2017-05-22 14:39:05 -07:00