Can kubernetes-client work with random resources or be extended to do so? #176
Replies: 1 comment
-
Hey, I think this is supported now by #16 from @novakov-alexey-zz |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Joan, team,
First of all, thanks for your great work and this awesome library! Having typelevel-stack tool to access Kubernetes API with (among other features) an option to configure authorization credentials is very handy.
But I have found it a bit problematic to use for anything beyond common entities APIs (pods, services, etc.).
So my task was to access Openshift routes from a k8s cluster. I tried it with
CustomResourcesApi
, using circe Json type for the insides, as it was easy for quick testing. But it broke on parsing withAs you can see from routes specification, an item of them has only one mandatory field,
spec
, whileapiVersion
andkind
, required byCustomResource
, are optional. Which caused the problem for me -- they were missing in the fetched data, and client failed to parse it.I thought then, OK, I can try to extend the API, make another
Listable
. But I was sad to see, thatListable
is private! And so are all-able
traits, which appears to make impossible to usekubernetes-client
to work with more or less non-canon data.Can these traits become public? Is it possible to extend
kubernetes-client
to digest more random data (keeping structure with-able
traits)? Or am I missing some point about the library?Beta Was this translation helpful? Give feedback.
All reactions