- 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
Heapster is retired since 1.11.
Having kubectl top mention Heapster is confusing for users.
Kubernetes-commit: 6d9fbd2d9f2fa77da20ebdf800d129e70ee7b932