-
According to the documentation here: https://kube.rs/controllers/relations/#watched-relations it looks it is possible to add an ObjectRef to my custom resource defintion, however that doesn't work as it implements neither Serialize and JsonSchema. Is there a full example for that code or am i completely misunderstanding something? I can create the objectRef by hand based on a custom struct, so no stress, i'm just curious if i'm overcomplicating something that is supposed to be easy? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You can look at the rust doc examples for more info about the types to get things to build. In particular, see If you are getting missing impls you probably get those from elsewhere (like on the main crd perhaps). If you are creating the runtime variant of an |
Beta Was this translation helpful? Give feedback.
oh, interesting. yeah. you are nesting an
ObjectRef
(which does not deriveJsonSchema
) inside your struct and thus it's not even possible to deriveJsonSchema
forPgBouncerDatabaseSpec
the annoying part is that the more schematically correct
ObjectReference
which we normally generate fromResource::object_ref
does implement this 🙃