kubectl/pkg/metricsutil
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
..
metrics_printer.go Sort kubectl top output when --sort-by and --containers are used together 2020-08-06 11:47:09 -04:00