-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-generic Watch for CRD's without Type #1413
Comments
JToken is a Newtonsoft.Json object, this library uses System.Text.Json, you can try using JsonDocument and JsonElement. Alternatively, you can generate types for the CRDs using https://github.com/IvanJosipovic/KubernetesCRDModelGen |
If I could receive the result.Body (string) over the Watch I could convert it to JToken inside of the my method |
|
Thanks for everyone's help and suggestions, even if I have to take JsonElement and convert to JToken
|
Describe the bug
I have several CRDs which I don't have types. I have a simple function it lists them as JToken then, rest of the application validate the configuration over JsonPath base rule engine.
`
`
A clear and concise description of what the bug is.
I am trying to create a similar function over Watch I have tried several methods and I have failed.
is there any method I can use for Watch which can return Response Body then I can convert it to JToken ?
or do you have any suggestion on how to work with Watch without having POCO classes for the CRD types.
Kubernetes C# SDK Client Version
e.g.
10.0.31
Server Kubernetes Version
e.g.
1.26.3
Dotnet Runtime Version
e.g. net7
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
KubeConfig
If applicable, add a KubeConfig file with secrets redacted.
Where do you run your app with Kubernetes SDK (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: