Closed yardenshoham closed 1 year ago
I now realize every example can work with native label selectors. For example:
$ ./kube-capacity --node-labels color=red,shape!=square
NODE CPU REQUESTS CPU LIMITS MEMORY REQUESTS MEMORY LIMITS
* 1050m (4%) 200m (0%) 340Mi (2%) 440Mi (2%)
kind-control-plane 950m (7%) 100m (0%) 290Mi (3%) 390Mi (4%)
kind-worker2 100m (0%) 100m (0%) 50Mi (0%) 50Mi (0%)
So I don't really see a reason for --exclude-node-labels
.
Added a new flag
--exclude-node-labels
to exclude nodes with the provided label selector.Behavior and examples
I'm testing with the following cluster configuration:
All nodes
Only nodes with
color=red
Only nodes with
shape=square
Nodes with
color=red
, excluding those withshape=square
All nodes except those that have both
color=red
andshape=square