kubewarden / rust-policy-template

A Kubewarden rust policy template to be used with cargo-generate
https://kubewarden.io
Apache License 2.0
9 stars 6 forks source link

fix: validate resource kind. #40

Closed jvanz closed 11 months ago

jvanz commented 11 months ago

Description

In order to allow only pod resource in the template policy, it's necessary to check the resource kind before trying to parse. This is necessary because the parse function can be able to parse it even if the resource is not pod. This is necessary to improve the docs about writing policy in rust.