FairwindsOps / polaris

Validation of best practices in your Kubernetes clusters
https://www.fairwinds.com/polaris
Apache License 2.0
3.17k stars 213 forks source link

Policies for API actions (create, delete, update) #1037

Closed ErikLundJensen closed 4 months ago

ErikLundJensen commented 6 months ago

Prevent cluster admins from doing dangerous changes, for example deleting a Kubernetes node.

Could Polaris be extended with rules that includes the API action applied? This will only be rules that the Polaris webhook validator can handle as the Polaris dashboard only looks the current state and have no notation of actions. In theory the Polaris dashboard could be extended to show Kubernetes events related to Polaris webhook rejections, however, that would be another feature request.

A solution could be adding the action as a variable available in the GoLang templates in the custom rule definitions.