Watching for custom resources not working
simhnna opened this issue · 1 comments
I'm trying to watch a custom resource. Here is the code I'm using https://github.com/simhnna/kubernetes-client-demo
Listing objects works fine. Watching for objects doesn't however. It errors out during a Decode here
with
error(*k8s.io/apimachinery/pkg/runtime.notRegisteredErr) *{schemeName: "pkg/runtime/scheme.go:100", gvk: k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind {Group: "next.aeb.com", Version: "__internal", Kind: "NextPlatform"}, target: k8s.io/apimachinery/pkg/runtime.GroupVersioner nil, t: reflect.Type nil}
I tracked it down to an undefined decode that's returned from NewClientNegotiator
here
I couldn't find any place that sets decode
, so I modified the code to add decode: gv
. With that change my code works.
I assume this is a bug. Otherwise I'd be very happy to know how I'm supposed to watch for my custom resources.
Not sure where to actually open issues. But since I'm not allowed to merge here, I opened this instead kubernetes/kubernetes#112915