stackrox / kube-linter

KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices.

Home Page:https://docs.kubelinter.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE_REQUEST] unset-cpu-requirements should use requirementsType: "request"

jholecek-rh opened this issue · comments

Description of the problem/feature request

The requirementsType parameter of the built-in unset-cpu-requirements check is set to any which means that workloads need to specify both CPU requests and CPU limits to pass the check.

This doesn't seem to match the best practices (according to some sources at least) which suggest that:

  • All workloads should set CPU requests
  • Only some workloads should set CPU limits; CPU limits can be actually harmful to some workloads

I suggest softening the built-in check to require only CPU requests to be set.

Description of the existing behavior vs. expected behavior

The current unset-cpu-requirements check sets requirementsType to any.

I am suggesting to change it to request.

Additional context

Nothing to put here.

I work around this currently with an annotation. Having this merged would be appreciated.