Commit Graph

7 Commits

Author SHA1 Message Date
Chok Yip Lau 7254bd442d Added --sum flag to kubectl top pod
Kubernetes-commit: 71acf56766c966653c3d1fe0ef6f3f036277d546
2021-09-16 09:28:30 -04:00
wujiangfa-xlauncher cadea4d691 fix top node output format incorrect
#105112

Kubernetes-commit: e838017f11dae4bc1c0a12c9703d0153661bd27d
2021-09-18 09:41:51 +08:00
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
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
wojtekt 7f6186e3c1 Eliminate couple unnecessary conversions
Kubernetes-commit: 067d173266303c5c9a4281e962d3662c34a78053
2019-11-12 14:19:14 +01:00
Sean Sullivan c6a8c8a72e Removes duplicate TabWriter. Several updates to reference the one remaining TabWriter in cli-runtime.
Kubernetes-commit: 958d7d3b6e74b8648fb897ce09f52049eb9823a1
2019-10-17 13:32:40 -07:00
Sean Sullivan 6f46e8d063 Move pkg/kubectl/metricsutil to staging
Kubernetes-commit: a1de0e93315dd56269a859b916ad5689ad4017b4
2019-07-24 20:58:38 -07:00