Commit Graph

522 Commits (e64c08f86971905560fec7761e37fcffa5a213d0)

Author SHA1 Message Date
zhangxiaoyu-zidif 260e2aa82d describe pod: add unit test for Node 2017-05-13 21:59:04 +08:00
xiangpengzhao 6ec162d816 Cleanup kubectl describe code 2017-05-13 10:24:30 +08:00
Kubernetes Submit Queue debced7449 Merge pull request #45572 from xiangpengzhao/fix-node-none
Automatic merge from submit-queue (batch tested with PRs 45685, 45572, 45624, 45723, 45733)

Display <none> for "kubectl get pods -o wide" when node is empty.

**What this PR does / why we need it**:
If pods are pending due to no matched node to be scheduled, `Spec.NodeName` would be empty. In this case, "kubectl get pods -o wide" displays `<none>` instead of empty.

**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-12 14:00:54 -07:00
zhangxiaoyu-zidif d1ba51f1ec get pod -o wide: add unittest for nodeName 2017-05-12 20:43:44 +08:00
Kubernetes Submit Queue 9a0f5ccb33 Merge pull request #45480 from xiangpengzhao/scheduledjob-cronjob
Automatic merge from submit-queue (batch tested with PRs 45634, 45480)

Rename vars scheduledJob to cronJob in describe.go

**What this PR does / why we need it**:
Rename vars scheduledJob to cronJob in describe.go

**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**:
There might still be some leftovers in other places.
@soltysh 

**Release note**:

```release-note
NONE
```
2017-05-11 00:12:40 -07:00
Kubernetes Submit Queue b040513aab Merge pull request #43067 from xilabao/dedup-in-printer
Automatic merge from submit-queue

De-duplication in printer
2017-05-10 19:08:59 -07:00
xiangpengzhao a9a36fcf4b
Display <none> for "kubectl get pods -o wide" when node is empty. 2017-05-10 12:53:14 +08:00
Kubernetes Submit Queue 148b5da60b Merge pull request #44746 from xiangpengzhao/fix-podpreset
Automatic merge from submit-queue

Add support for PodPreset in `kubectl get` command

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-09 21:16:17 -07:00
xiangpengzhao baafbf406e Add support for PodPreset in kubectl get command 2017-05-10 08:59:22 +08:00
xilabao 697efd1baf De-duplication in printer 2017-05-10 08:45:20 +08:00
xiangpengzhao b981909206
Rename vars scheduledJob to cronJob in describe.go 2017-05-08 17:30:10 +08:00
xiangpengzhao 3e389566bf
Display <none> when port is empty. 2017-05-08 16:08:49 +08:00
Kubernetes Submit Queue 17d33ea82e Merge pull request #44830 from NickrenREN/remove-NodeLegacyHostIP
Automatic merge from submit-queue

Remove deprecated NodeLegacyHostIP

**Release note**:
```release-note
Remove deprecated node address type `NodeLegacyHostIP`.
```

ref #44807
2017-05-05 15:38:58 -07:00
Fabiano Franz 1aa84d101a Fixes get -oname for unstructured objects 2017-04-28 14:12:36 -03:00
Kubernetes Submit Queue 22957509e7 Merge pull request #44600 from xingzhou/kube-44599
Automatic merge from submit-queue

Fixed a tiny issue for ShortHumanDuration printer.

Fixed a tiny issue for ShortHumanDuration printer
to avoid "0y" message.

Fixed #44599
2017-04-25 08:59:07 -07:00
NickrenREN 7d00e5cfb6 remove deprecated NodeLegacyHostIP 2017-04-24 11:01:25 +08:00
Kubernetes Submit Queue 8e3d32b141 Merge pull request #44710 from xiangpengzhao/describe-print-rc-rs-conditions
Automatic merge from submit-queue

Print conditions of RC/RS in 'kubectl describe' command

**What this PR does / why we need it**:
If conditions of RC/RS exist, print them in 'kubectl describe' command.

**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
Print conditions of RC/RS in 'kubectl describe' command.
```
2017-04-21 07:47:29 -07:00
xiangpengzhao b577754726 Print conditions of RC/RS in 'kubectl describe' command 2017-04-21 10:54:17 +08:00
Kubernetes Submit Queue 870585e8e1 Merge pull request #44651 from knightXun/string
Automatic merge from submit-queue (batch tested with PRs 44594, 44651)

remove strings.compare(), use string native operation

I notice we use strings.Compare() in some code, we can remove it and use native operation.
2017-04-20 14:08:59 -07:00
Kubernetes Submit Queue 6bf7914a71 Merge pull request #44594 from xiangpengzhao/describe-node-depre-phase
Automatic merge from submit-queue

Delete deprecated node phase in kubect describe node.

**What this PR does / why we need it**:
Since NodePhase is no longer used, delete it in `kubect describe node` result. 

**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**:
ref: https://github.com/kubernetes/kubernetes/pull/44388

**Release note**:

```release-note
NONE
```
2017-04-20 13:48:52 -07:00
xu fei b0a3f492af remove strings.compare(), use string native operation 2017-04-19 09:32:29 +08:00
Xing Zhou 35c900aa70 Fixed a tiny issue for ShortHumanDuration printer.
Fixed a tiny issue for ShortHumanDuration printer
to avoid "0y" message.
2017-04-18 16:11:41 +08:00
Fabiano Franz b276f17b6d Smarter get printer for generic resources 2017-04-17 15:42:47 -03:00
Fabiano Franz 151770c8fd Smarter describer for generic resources 2017-04-17 15:42:47 -03:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue 15a24eb056 Merge pull request #44316 from xiangpengzhao/print-node-addr
Automatic merge from submit-queue (batch tested with PRs 44440, 44038, 44302, 44316, 43876)

Show node address type in kubectl describe node command

**What this PR does / why we need it**:
To make node addresses more clear when describing node.

Before:
```
Addresses:		192.168.1.220,192.168.1.220,192.168.1.220
```

After:
```
Addresses:
 LegacyHostIP:	192.168.1.220
 InternalIP:	192.168.1.220
 Hostname:	192.168.1.220
```

**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-04-13 23:18:05 -07:00
Chao Xu 9837a98564 move resource_helpers.go to a subpackage 2017-04-13 12:03:42 -07:00
Chao Xu d9920c53a5 move ref.go to its own subpackage 2017-04-13 10:02:43 -07:00
xiangpengzhao e1e1834e8b Show node address type in kubectl describe node command 2017-04-13 09:22:39 +08:00
Kubernetes Submit Queue c9014b1029 Merge pull request #42849 from janetkuo/kubectl-describe-controllerRef
Automatic merge from submit-queue

In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator

@enisoc @kargakis @kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews 

```release-note
In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator.
```
2017-04-12 09:05:41 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Janet Kuo b29135ea8f In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator 2017-04-11 15:41:57 -07:00
xiangpengzhao 10d60f615b
Delete deprecated node phase in kubect describe node. 2017-04-11 16:40:27 +08:00
Kubernetes Submit Queue c8f90171e4 Merge pull request #39678 from resouer/extract-resource
Automatic merge from submit-queue (batch tested with PRs 41775, 39678, 42629, 42524, 43028)

Extract resources functions belongs to api/util

Address: extract kubelet resources functions belongs to `pkg/api/v1/resource_helpers.go`
2017-04-07 17:44:14 -07:00
NickrenREN 6327724b51 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
2017-04-05 16:22:31 +08:00
Maciej Pytel 8551049ba9 Include events when describing configmap 2017-04-03 15:03:12 +02:00
Harry Zhang efb10b1821 Move extract resources to its pkg
Move ExtractContainerResourceValue
2017-04-03 13:06:48 +08:00
Kubernetes Submit Queue 74c23bdf68 Merge pull request #41805 from aanm/adding-ipv6-brackets-in-kubectl-endpoint
Automatic merge from submit-queue

kubectl: Adding IPv6 brackets for IPv6 endpoints

This fixes the lack of IPv6 when printing the IP:Port tuple with kubectl
describe command.

Signed-off-by: André Martins <aanm90@gmail.com>

**What this PR does / why we need it**: This adds IPv6 brackets on IPv6 endpoints when using `kubectl describe service`

**Special notes for your reviewer**: Since the IP is a string I think the fastest way to detect if it's an IPv6 was to check for the presence of : in it. Let me know what you think.
2017-04-02 07:57:08 -07:00
Kubernetes Submit Queue 9c62733b1f Merge pull request #43044 from ncdc/NewPrefixWriter
Automatic merge from submit-queue (batch tested with PRs 42900, 43044, 42896, 43308, 43621)

Convert PrefixWriter to an interface

Convert PrefixWriter to an interface to allow other packages to create instances. This is needed for downstream projects such as OpenShift.

cc @sttts @smarterclayton @oulinbao @deads2k @liggitt @kargakis @soltysh @kubernetes/sig-cli-pr-reviews
2017-03-27 08:32:25 -07:00
Kubernetes Submit Queue f9e87e1dc2 Merge pull request #42902 from louyihua/allow-tcp-probe-host
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

Add Host field to TCPSocketAction

Currently, TCPSocketAction always uses Pod's IP in connection. But when a pod uses the host network, sometimes firewall rules may prevent kubelet from connecting through the Pod's IP.

This PR introduces the 'Host' field for TCPSocketAction, and if it is set to non-empty string, the probe will be performed on the configured host rather than the Pod's IP. This gives users an opportunity to explicitly specify 'localhost' as the target for the above situations.

```release-note
Add Host field to TCPSocketAction
```
2017-03-25 17:17:23 -07:00
Kubernetes Submit Queue f37cffcf4e Merge pull request #43239 from enisoc/kubectl-controller-ref
Automatic merge from submit-queue

kubectl: Use v1.5-compatible ownership logic when listing dependents.

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

This restores compatibility between kubectl 1.6 and clusters running Kubernetes 1.5.x. It introduces transitional ownership logic in which the client considers ControllerRef when it exists, but does not require it to exist.

If we were to ignore ControllerRef altogether (pre-1.6 client behavior), we would introduce a new failure mode in v1.6 because controllers that used to get stuck due to selector overlap will now make progress. For example, that means when reaping ReplicaSets of an overlapping Deployment, we would risk deleting ReplicaSets belonging to a different Deployment that we aren't about to delete.

This transitional logic avoids such surprises in 1.6 clusters, and does no worse than kubectl 1.5 did in 1.5 clusters. To prevent this when kubectl 1.5 is used against 1.6 clusters, we can cherrypick this change.

**Which issue this PR fixes**:

Fixes #43159

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-17 14:25:38 -07:00
André Martins cecc03ca8f kubectl: Adding IPv6 brackets for IPv6 endpoints
This fixes the lack of IPv6 when printing the IP:Port tuple with kubectl
describe command.

Signed-off-by: André Martins <aanm90@gmail.com>
2017-03-17 15:14:51 +00:00
Anthony Yeh 725ec0cc5e kubectl: Check for Deployment overlap annotation in reaper.
This effectively reverts the client-side changes in
cec3899b96.
We have to maintain the old behavior on the client side to support
version skew when talking to old servers that set the annotation.

However, the new server-side behavior is still to NOT set the
annotation.
2017-03-16 12:28:28 -07:00
Seth Jennings 753484d073 kubectl: fall back to computing QoS class if server does not populate 2017-03-16 12:24:59 -05:00
Lou Yihua 63f1b077dc Add Host field to TCPSocketAction
Currently, TCPSocketAction always uses Pod's IP in connection. But when a
pod uses the host network, sometimes firewall rules may prevent kubelet
from connecting through the Pod's IP. This PR introduces the 'Host' field
for TCPSocketAction, and if it is set to non-empty string, the probe will
be performed on the configured host rather than the Pod's IP. This gives
users an opportunity to explicitly specify 'localhost' as the target for
the above situations.
2017-03-14 23:48:28 +08:00
Andy Goldstein 433fc606c6 Convert PrefixWriter to an interface
Convert PrefixWriter to an interface to allow other packages to create
instances. This is needed for downstream projects such as OpenShift.
2017-03-14 10:31:13 -04:00
Kubernetes Submit Queue 65ddace3ed Merge pull request #42702 from smarterclayton/printer_owners
Automatic merge from submit-queue

Add pkg/printers OWNERS

Should also include more sig-api-machinery as this will be moving to server side
2017-03-12 21:04:57 -07:00
Janet Kuo 39857f4865 Add new DaemonSetStatus to kubectl printer and describer 2017-03-09 15:45:17 -08:00
Clayton Coleman 1118e6be35
Add pkg/printers OWNERS 2017-03-07 22:28:27 -05:00
Anthony Yeh cec3899b96 Deployment: Remove Overlap and SelectorUpdate annotations.
These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
2017-03-06 15:12:08 -08:00
Kubernetes Submit Queue f81a0107f0 Merge pull request #38924 from vladimirvivien/scaleio-k8s
Automatic merge from submit-queue (batch tested with PRs 42443, 38924, 42367, 42391, 42310)

Dell EMC ScaleIO Volume Plugin

**What this PR does / why we need it**
This PR implements the Kubernetes volume plugin to allow pods to seamlessly access and use data stored on ScaleIO volumes.  [ScaleIO](https://www.emc.com/storage/scaleio/index.htm) is a software-based storage platform that creates a pool of distributed block storage using locally attached disks on every server.  The code for this PR supports persistent volumes using PVs, PVCs, and dynamic provisioning.

You can find examples of how to use and configure the ScaleIO Kubernetes volume plugin in [examples/volumes/scaleio/README.md](examples/volumes/scaleio/README.md).

**Special notes for your reviewer**:
To facilitate code review, commits for source code implementation are separated from other artifacts such as generated, docs, and vendored sources.

```release-note
ScaleIO Kubernetes Volume Plugin added enabling pods to seamlessly access and use data stored on ScaleIO volumes.
```
2017-03-03 18:08:40 -08:00
Kubernetes Submit Queue f7c07a121d Merge pull request #42285 from liggitt/get-watch
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

Fix error printing objects from kubectl get -w

Fixes #42276
2017-03-03 16:44:45 -08:00
Vladimir Vivien 915a54180d Addition of ScaleIO Kubernetes Volume Plugin
This commits implements the Kubernetes volume plugin allowing pods to seamlessly access and use data stored on ScaleIO volumes.
2017-03-03 15:47:19 -05:00
Kubernetes Submit Queue 819364004f Merge pull request #42283 from smarterclayton/deployment_describe
Automatic merge from submit-queue

Describers with pod templates should have consistent output

Added a test to verify it.

Fixes #38698
2017-03-02 11:43:04 -08:00
Kubernetes Submit Queue 8cc7475ce1 Merge pull request #42218 from smarterclayton/incorrect_storageclass_printer
Automatic merge from submit-queue

StorageClass should not print the namespace column

Fixes #40091
2017-03-02 09:24:30 -08:00
Clayton Coleman b3485e7c6a
Remove images field in describer and use pod template consistently
Images field didn't include init containers. Use pod template output
consistently and ensure labels and annotations are in the right spot
2017-03-02 08:28:50 -05:00
Clayton Coleman d8ee5e003c
Improve statefulset describer to include volume templates 2017-03-02 08:10:32 -05:00
Clayton Coleman 39a32a627f
Clean up top level labels in describer 2017-03-02 08:10:31 -05:00
Clayton Coleman a5bf3d5424
Deployment describer should include containers
Added a test to verify it.
2017-03-02 08:10:27 -05:00
Jan Safranek 7ae4152712 Move PV/PVC annotations to PV/PVC types.
They aren't part of storage.k8s.io/v1 or v1beta1 API.
Also move associated *GetClass functions.
2017-03-02 10:23:55 +01:00
Maciej Szulik c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Kubernetes Submit Queue c179f38fc2 Merge pull request #42162 from kevin-wangzefeng/kubectl-tolerationseconds
Automatic merge from submit-queue

fix kubectl describe pod, show tolerationSeconds

**What this PR does / why we need it**:
tolerationSeconds is now not shown in kubectl describe resutl, this PR is to fix it.

With this fix, pod toleration with tolerationSeconds would like below:
```yaml
Name:           bar
Namespace:      foo
Node:           /
Labels:         <none>
Status:
IP:
Controllers:    <none>
Containers:     <none>
No volumes.
QoS Class:
Node-Selectors: <none>
Tolerations:    key1=value1
				key2=value2:NoSchedule
				key3=value3:NoExecute for 300s
```


**Which issue this PR fixes** : 
Related issue: #1574
Related PR: #39469

**Special notes for your reviewer**:

**Release note**:

```release-note
make kubectl describe pod show tolerationSeconds
```
2017-02-28 22:00:55 -08:00
Jordan Liggitt 31b3e01f1e
Fix error printing objects from kubectl get -w 2017-02-28 22:36:26 -05:00
Aditya Dani 28df55fc31 Portworx Volume Driver in Kubernetes
- Add a new type PortworxVolumeSource
- Implement the kubernetes volume plugin for Portworx Volumes under pkg/volume/portworx
- The Portworx Volume Driver uses the libopenstorage/openstorage specifications and apis for volume operations.

Changes for k8s configuration and examples for portworx volumes.

- Add PortworxVolume hooks in kubectl, kube-controller-manager and validation.
- Add a README for PortworxVolume usage as PVs, PVCs and StorageClass.
- Add example spec files

Handle code review comments.

- Modified READMEs to incorporate to suggestions.
- Add a test for ReadWriteMany access mode.
- Use util.UnmountPath in TearDown.
- Add ReadOnly flag to PortworxVolumeSource
- Use hostname:port instead of unix sockets
- Delete the mount dir in TearDown.
- Fix link issue in persistentvolumes README
- In unit test check for mountpath after Setup is done.
- Add PVC Claim Name as a Portworx Volume Label

Generated code and documentation.
- Updated swagger spec
- Updated api-reference docs
- Updated generated code under pkg/api/v1

Godeps update for Portworx Volume Driver
- Adds github.com/libopenstorage/openstorage
- Adds go.pedge.io/pb/go/google/protobuf
- Updates Godep Licenses
2017-02-28 23:24:56 +00:00
Chun Chen b605da2522 kubectl describe: show annotations 2017-02-28 13:20:23 +08:00
Clayton Coleman fdbdbfe0cf
StorageClass should not print the namespace column 2017-02-27 22:31:40 -05:00
Kevin 49072c810a fix kubectl describe pod, show tolerationSeconds 2017-02-27 13:44:36 +00:00
Clayton Coleman 651188d687
generated: bazel 2017-02-23 00:28:32 -05:00
Clayton Coleman 7cdb0eb89f
NamePrinter should not hardcode scheme 2017-02-23 00:28:31 -05:00
Clayton Coleman 90fdd067e9
Restrict imports for printers 2017-02-23 00:28:31 -05:00
Clayton Coleman 3704ceffd2
Refactor printers to separate typed printers from generic code 2017-02-23 00:28:30 -05:00
Clayton Coleman 6d1c7308a5
Move, but do not refactor, printers to their own package 2017-02-23 00:28:30 -05:00