zegl / kube-score

Kubernetes object analysis with recommendations for improved reliability and security. kube-score actively prevents downtime and bugs in your Kubernetes YAML and Charts. Static code analysis for Kubernetes.
https://kube-score.com
MIT License
2.72k stars 174 forks source link

Feature #413: container ephemeral storage request and limit check #429

Closed kmarteaux closed 2 years ago

kmarteaux commented 2 years ago
RELNOTE: Implement new Pod container resource checks for ephemeral storage. Default tests for request and limit settings. Optional test to ensure matching ephemeral storage request and limit values.
kmarteaux commented 2 years ago

Refactored the original implementation - moved the new checks to score/container.go and the associated tests to score/score_test.go. Split the resource checks into default (are they set) and optional (are they equal) as previously recommended. Removed the separate score/ephemeralstorage/ephemeralstorage.go and score/ephemeralstorage_test.go files. Updated score.go to remove ref to deleted files.

zegl commented 2 years ago

Thanks! Looks great 👍 , there's just one test case (the happy path) that isn't tested. Update the PR with that, and we're ready to ship!

bors[bot] commented 2 years ago

Build succeeded: