Open davidivkovic opened 4 days ago
aot should not expose this prop as you can't config it
Is it possible to register a serializer context for custom types used with client.CustomObjects.CreateNamespacedCustomObjectWithHttpMessagesAsync(customObject)
?
it is not possible in aot everything is compiled ahead of time, no dynamic code allowed in this mode
if the main sdk good for you, aot is for performance scenarios only
So it's currently not possible to use the CreateNamespacedCustomObject
method in AOT?
Describe the bug
KubernetesClientConfiguration.JsonSerializerOptions
always returns null.The getter for this property calls the
KubernetesJson.AddJsonOptions
method which is empty.https://github.com/kubernetes-client/csharp/blob/61e6b13fd7828eb3d76b249b259b3444b0462564/src/KubernetesClient/KubernetesClientConfiguration.cs#L122-L139
https://github.com/kubernetes-client/csharp/blob/61e6b13fd7828eb3d76b249b259b3444b0462564/src/KubernetesClient.Aot/KubernetesJson.cs#L76-L78
Kubernetes C# SDK Client Version KubernetesClient.Aot 15.0.1
Server Kubernetes Version
1.30.2
Dotnet Runtime Version .net9
To Reproduce Create a
KubernetesClientConfiguration
and call theJsonSerializerOptions
property.Expected behavior A
System.Text.Json.JsonSerializerOptions
instance to be returned.Where do you run your app with Kubernetes SDK (please complete the following information): Linux