kubewarden / policy-sdk-go

Kubewarden Policy SDK for the Go programming language
https://kubewarden.io
Apache License 2.0
8 stars 7 forks source link

Attempt to use Kubernetes native structs #15

Open flavio opened 3 years ago

flavio commented 3 years ago

A validation response includes the JSON description of a Kubernetes resource (e.g. a Pod, Ingress,...).

When processing a validation request, this object is available at request.object path. See "The ValidationRequest object look like that" over there.

It would be useful to unmarshall this object into a native Go structure. For example, assuming the policy is evaluating Pod objects, it would be nice to use the request.object to populate a corev1.Pod object.

The goal of this card is to see if the k8s.io/api/core/v1 package can be built using the latest release of TinyGo