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

fix: make conformant k8s requests #65

Closed flavio closed 9 months ago

flavio commented 9 months ago

The LabelSelector and FieldSelector should not be defaulted to an empty string, they should rather not be sent at all when unset.

To achieve that, they have to be represented with a pointer.

I noticed this behavior while reusing a session recorded with a Rust context aware policy. That doesn't mean the k8s integration has always been broken with Go policies, but we have not been 100% compliant with our spec.