Commit Graph

10 Commits

Author SHA1 Message Date
brianpursley f9c04a0266 Sort kubectl top output when --sort-by and --containers are used together
- Changed kubectl top to sort first at the pod level and then at the container level when --sort-by and --containers are used together.
- Refactored printSinglePodMetrics into two separate functions instead of passing in bool to change behavior.
- Refactored MetricsSorters to simplify code.
- Added unit tests to test container sorting.
- Fixed pod sorting unit tests which were not working because it was checking for --sort-by command line flag which was never true.

Kubernetes-commit: 04266b37ded103ddb84a192ec816499904fce1d1
2020-08-06 11:47:09 -04:00
Marek Siarkowicz 809652a24f Deprecate heapster related kubelet flags and remove their implementation
Heapster is retired since 1.11.
Having kubectl top mention Heapster is confusing for users.

Kubernetes-commit: 6d9fbd2d9f2fa77da20ebdf800d129e70ee7b932
2018-03-02 17:08:11 +01:00
Brian Pursley 09eaf230cc Fixed code formatting issues discovered by verify-gofmt
Kubernetes-commit: 78248d0c2aaca258b4210446dc38c096e83a1eb6
2020-02-04 10:11:18 -05:00
Brian Pursley 445baa99d2 Added 'No resources found' message to describe and top pod commands
Kubernetes-commit: e70a630dac6c0158a5f9bb571223ed5759096dc1
2020-01-24 10:42:08 -05:00
Name Surname b21179860f Fix kubectl top sort-by cpu and sort-by memory options
Kubernetes-commit: 824af9e3072d9d68071fec291ac3f5f89362e4ab
2019-09-04 16:28:21 +02:00
Clayton Coleman 4ca8f5ecfe test: kubectl unit tests should be using codecs without conversion
Tests are also refactored to use the simpler RESTClient code path.

Kubernetes-commit: 8a9b8c87c40ee65751828d9dd02f4f642588f0ce
2019-11-03 15:20:10 -05:00
clarklee92 87db492820 Modify the status code number to HTTP status semantics
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
2019-11-06 00:45:35 +08:00
Sean Sullivan 1483769081 Update gofmt
Kubernetes-commit: e2cae2344486af198f8ab38e4dd97d4f24dfd190
2019-08-01 13:14:06 -07:00
Sean Sullivan 5b48717f2d Update import statements to reflect code move
Kubernetes-commit: acece3c2964115a4f29a43e368ad5de59dbbc258
2019-08-01 11:10:05 -07:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00