You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to kubernetes and should preface by saying I'm using Claude to help create a system for deploying containers through Kube API.
I'm deriving a CustomResource but Rust complains that I'm not implementing the Metadata trait. Everything I read online says this derive should generate and implement these traits automatically, but I have had no success debugging manually.
error[E0277]: the trait bound `EnvioIndexerSpec: k8s_openapi::Metadata` is not satisfied
--> src/kubernetes/envio.rs:30:22
|
30 | impl ServiceSpec for EnvioIndexerSpec {
| ^^^^^^^^^^^^^^^^ the trait `k8s_openapi::Metadata` is not implemented for`EnvioIndexerSpec`, which is required by `EnvioIndexerSpec: kube::Resource`|
The text was updated successfully, but these errors were encountered:
Hey looks mostly sensible. You need to implement your traits on the generated top level type EnvioIndexer rather than EnvioIndexerSpec, then you should probably get it working.
Elaboration; only the top level spec gets the traits generated. The Spec struct is the "user struct", but it's not the one we use for the Kubernetes API (because it does not have explicit metadata and type information).
Hello,
I'm new to kubernetes and should preface by saying I'm using Claude to help create a system for deploying containers through Kube API.
I'm deriving a CustomResource but Rust complains that I'm not implementing the
Metadata
trait. Everything I read online says this derive should generate and implement these traits automatically, but I have had no success debugging manually.I'm defining my service spec as follows:
and implementing a trait
Error
The text was updated successfully, but these errors were encountered: