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: wrong Kubernetes kinds. #62

Closed jvanz closed 9 months ago

jvanz commented 9 months ago

Description

The SDK is using the wrong kind types to extract and update PodSpec in the different Kubernetes kinds supported. This commit fixes the kind names.

jvanz commented 9 months ago

LGTM! I wonder if this may have been misused in some policy already, but I guess we will find out when we bump the sdk there.

As far as I know, there is no policies using this functions. At least, none maintained by the Kubewarden team

flavio commented 9 months ago

This is fine, but we should look for group and version too. Otherwise something like argocd.io/v1/Deployment would be mistaken as apps/v1/Deployment

@jvanz can you please file an issue about that? This can be fixed with another PR

jvanz commented 9 months ago

This is fine, but we should look for group and version too. Otherwise something like argocd.io/v1/Deployment would be mistaken as apps/v1/Deployment

@jvanz can you please file an issue about that? This can be fixed with another PR

@flavio I've opened two issues to address this in the go and rust SDKs.

https://github.com/kubewarden/policy-sdk-go/issues/63 https://github.com/kubewarden/policy-sdk-rust/issues/126