I'm trying to use the go client package but the type definition for Lists of resources looks wrong. For example for computeInstanceList you have
type ComputeInstanceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Items []ComputeInstance `json:"items"`
}
I would expect metav1.ListMeta instead of metav1.ObjectMeta for Lists
GO client version: v1.41.0
Hi @averzicco, thanks for reporting the issue. We will look into the fix for it and update this thread when we have more information. Thanks
Yeah this bug prevents us from using the go types as we can't list the objects using the go client. This prevents us from setting watches.
For the record, this bug froze my controller with this error:
pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:167: Failed to watch *v1beta1.SQLDatabase: failed to list *v1beta1.SQLDatabase: returned object must be a list: object does not implement the List interfaces
@aa250816, @guilhem, and @averzicco, we're really sorry this bug was introduced with our go-clients. We have a fix staged for the next release and will update this thread when the release is out. Thank you for your patience!
This bug has been fixed with v1.45.0 release
Most helpful comment
Yeah this bug prevents us from using the go types as we can't list the objects using the go client. This prevents us from setting watches.