在开放策略代理 ( https://www.openpolicyagent.org/ )
关于 Kubernetes,取决于使用的引擎:
或者
- 带有 kube-mgmt 的普通 OPA:https ://www.openpolicyagent.org/docs/latest/kubernetes-introduction/#how-does-it-work-with-plain-opa-and-kube-mgmt
定义验证规则有不同的方法:
在 Gatekeeper
violation
中使用。在此处查看示例规则:https ://github.com/open-policy-agent/gatekeeper-library/tree/master/library/general在普通 OPA 示例中,
deny
规则请参见此处的示例: https ://www.openpolicyagent.org/docs/latest/kubernetes-introduction/#how-does-it-work-with-plain-opa-and-kube-mgmt
似乎 OPA 约束框架将其定义为violation
:
https ://github.com/open-policy-agent/frameworks/tree/master/constraint#rule-schema
那么这背后的确切“故事”是什么,为什么不同引擎之间不一致?
笔记: