open-policy-agent / frameworks

Apache License 2.0
120 stars 50 forks source link

Multi-target ConstraintTemplate #225

Open tpolekhin opened 2 years ago

tpolekhin commented 2 years ago

Hello!

I'm using gatekeeper to validate KCC resources in GKE cluster. I have a library of constraints and templates written for KCC object structure.

I would like to extend this validation and check objects with different structure, like GCP API representation of the object.

It would be convenient to keep different Rego scripts designed to check for the same thing in one place, but I've noticed that currently ConstraintTemplates support only one Target, so I can't define multiple checks in the same template.

What's the status on the multi-target templates? Are they on the roadmap? What's the timeline?

Or you would recommend not to wait for this to be implemented and seek another solution, because it can take a long time?

Thanks

maxsmythe commented 2 years ago

Hi!

Sorry for the slow response, but I was working on a design doc that was relevant to this question. I just put it up on this GitHub discussion: https://github.com/orgs/open-policy-agent/discussions/204

tpolekhin commented 5 months ago

@maxsmythe any updates on this?

maxsmythe commented 5 months ago

Some progress.