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.75k stars 177 forks source link

Gatekeeper policy compatibility #526

Open mafrosis opened 1 year ago

mafrosis commented 1 year ago

Hi there, nice project!

I'm interested to know if anyone has thought about compatibility between the checks in kube-score and policy we might deploy into Gatekeeper?

I would much prefer the same exact same policy to by applied in both my pipeline during development, and in the cluster at deploy time. If we could somehow derive/export Rego code from kube-score then I think this could work.

Thanks!

kmarteaux commented 1 year ago

@mafrosis , to be honest, I haven't thought much about it, but your question piqued my interest, but first I need to educate myself about Gatekeeper and OPA's Rego language.

kmarteaux commented 1 year ago

@mafrosis, having read through the Gatekeeper/OPA documentation -- I'm wondering a bit more about your use case. If one applied gating criteria to the desired policies via a pipeline during development ... why would one need the same policies enforced at runtime? One could simply block a created artifact from being deployable.