kubewarden / kwctl

Go-to CLI tool for Kubewarden users
https://kubewarden.io
Apache License 2.0
73 stars 15 forks source link

Allow to run policies with different runtimes #58

Closed ereslibre closed 3 years ago

ereslibre commented 3 years ago

Depends on: https://github.com/kubewarden/policy-evaluator/issues/21

In kwctl, an optional --runtime-mode flag has to be exposed with options: autodetect (default), kubewarden-wapc, opa and opa-gatekeeper that will be forwarded to the policy-evaluator. If autodetect is used (the default), the the policy-evaluator will be the responsible for running the given heuristics defined in https://github.com/kubewarden/policy-evaluator/issues/21.

flavio commented 3 years ago

I partially agree, let me explain.

Preamble:

Having said that, I think it would be nice to allow a cli flag as the one you described. This can be handy when doing quick prototyping of a policy. When the user provides this flag, the policy-evaluator will ignore the metadata (if present) and just use the runtime specified by the user

ereslibre commented 3 years ago

+1, we are in agreement. I also mention that this new flag is optional, and by default will honor the metadata in the policy.

flavio commented 3 years ago

To recap: