Closed RileySeaburg closed 8 months ago
this is more kube
related than k8s-openapi
since you are bypassing the structs entirely. i don't use create
much myself since it's an older pattern, but on a suspicious note, are you passing string serialised yaml to the api (which takes json)? see a normal create example.
you can also increase the log level of kube to see what goes on the wire.
Hey @clux I appreciate your swift response.
I'm not sure what you referring to in regards to "bypassing the structs".
I can confirm that the Yaml version does work for creating namespaces. It also works for creating deployments.
It just seems to get stuck on other items such as ingresses.
I'll go ahead and serialize my yaml to json and see what I come up with.
Thanks again and great project.
@clux I'm surprised this works as well, but also the doc of Api::create
does specifically allow it:
This function requires a type that Serializes to
K
, which can be:
- Raw string YAML
Lol @Arnavion
error prone (run-time errors on typos due to failed serialize attempts)
Can confirm this is true.
Great project here,
Just a note when trying to create any services inside a cluster using the API object leaves a error that comes up on basically every kubernetes object type.
As you can see the Namespace for the service is clearly defined using an object from earlier. When we runt the print on this object the namespace is represented as Some("namespace_name");
It appears there is a serialization error, but it's not happening when the service is defined, rather its occurring when the API is called, and the service is being created.