Using Both Constraints & OPA ConfigMap Rules #470
-
I'm looking into implementing Gatekeeper in order to leverage the PodSecurityPolicy policies, but already have a hundred or so OPA rules defined in ConfigMaps. I'll likely migrate some of these over to Gatekeeper to facilitate better parameterization, but that will take some time. Is it possible to run with some rules in Constraints / ConstraintTemplates via Gatekeeper, while maintaining my existing OPA rules in ConfigMaps? Are there any issues that could pop up with that kind of setup? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @ChuckQuinnIV! You can configure as many validating admission controllers as you want, using OPA, Gatekeeper and/or something else entirely. Only downside I can think of is the added complexity of having to manage multiple solutions (with different ways to fetch policy, log decisions, and so on), and of course the extra latency added by each webhook. If you already have "plain" OPA configured for validating admission control, could the Gatekeeper PSP policies not be ported for evaluation in that context without too much effort, assuming they're both Rego? If that's not the case, running both doesn't seem too controversial to me. |
Beta Was this translation helpful? Give feedback.
Hi @ChuckQuinnIV!
You can configure as many validating admission controllers as you want, using OPA, Gatekeeper and/or something else entirely. Only downside I can think of is the added complexity of having to manage multiple solutions (with different ways to fetch policy, log decisions, and so on), and of course the extra latency added by each webhook.
If you already have "plain" OPA configured for validating admission control, could the Gatekeeper PSP policies not be ported for evaluation in that context without too much effort, assuming they're both Rego? If that's not the case, running both doesn't seem too controversial to me.