robscott / kube-capacity

A simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster
Apache License 2.0
2.09k stars 114 forks source link

Add support to exclude node labels #72

Open SimonBaeumer opened 1 year ago

SimonBaeumer commented 1 year ago

Currently it is possible to filter node labels with --node-labels. In reality some nodes have two labels like node-role.kubernetes.io/worker and node-role.kubernetes.io/infra. To exclude a node with a second label I would like to propose a feature to exclude labels with --exclude-node-labels.

robscott commented 1 year ago

This is a great idea, thanks @SimonBaeumer! Sadly I don't have time to take this on but would welcome any PRs.

yardenshoham commented 1 year ago

@SimonBaeumer how about kube-capacity --node-labels 'node-role.kubernetes.io/worker,!node-role.kubernetes.io/infra'?