What problem are you facing?
When writing Go functions using the kubebuilder Go structs from providers, it's possible to add add API types to a runtime.Scheme, which avoids the need to set the APIVersion and Kind fields. This depends on the types implementing runtime.Object.
Our generated Go schemas don't implement runtime.Object, and we don't provide AddToScheme helpers in the generated packages. This means users have to specify APIVersion and Kind for each composed resource, and it's also not possible to use the generated types with k8s ecosystem libraries that work with runtime.Objects.
Slack ref: https://crossplane.slack.com/archives/CEG3T90A1/p1782299819029779
How could Crossplane help solve your problem?
Generate the necessary methods to make our generated Go types implement runtime.Object, and generate AddToScheme helpers in each generated package.
What problem are you facing?
When writing Go functions using the kubebuilder Go structs from providers, it's possible to add add API types to a
runtime.Scheme, which avoids the need to set theAPIVersionandKindfields. This depends on the types implementingruntime.Object.Our generated Go schemas don't implement
runtime.Object, and we don't provideAddToSchemehelpers in the generated packages. This means users have to specifyAPIVersionandKindfor each composed resource, and it's also not possible to use the generated types with k8s ecosystem libraries that work withruntime.Objects.Slack ref: https://crossplane.slack.com/archives/CEG3T90A1/p1782299819029779
How could Crossplane help solve your problem?
Generate the necessary methods to make our generated Go types implement
runtime.Object, and generateAddToSchemehelpers in each generated package.