-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
Drop implicit kind->resource conversion #284
Comments
Totally! If it's possible to grab the actual values without relying on pluralization then that would be great. I just assumed the information was not available in the openapi spec by looking at the underlying types; e.g. Pod and introduced the dep in a bit of a hurry. Wonder how k8s-openapi does this. |
You can get the mapping at runtime from the Of course, that isn't great for our use-case (wouldn't want to need a running K8s cluster to be able to compile |
Looks like the OpenAPI does not include the resource name. On the other hand, I don't think it would be too bad to use a heurestic like "find the last path item of the list endpoint`. |
Found another case of our implicit naming not working today when doing #305. Ended up removing case/plural pedantry on the dynamic api to a mere debug check. Which is fine, dynamically created resources work if we aren't being strict. But THIS issue means that some of the objects noted in that PR might not work with Not even sure excess pluralisation in Can at least confirm that the required data is there on the api for all cases (albeit awkwardly split between two api calls). Hopefully there's a way we can get the data in the trait in |
There's no easy way of getting the plural as it stands. It happens to be in the urls of the schemas as noted in Arnavion/k8s-openapi#73 (comment). If the k8s-openapi issue resolves, we can progress here, otherwise marking as awaiting upstream work. |
This is less of an issue now that we maintain a pluralisation fn that handles the few non-conformant cases. All other entry ways no longer need to do this implicitly.
|
I've sent Arnavion/k8s-openapi#88 which adds resource name to the |
Motivated by #14, but the current behaviour mostly works by accident anyway.
RESOURCE_NAME
const
tok8s_openapi::Resource
(and add it to their generated object types)kube::Resource::kind
withresource_name
RESOURCE_NAME
from theCustomResource
deriverinflector
runtime dependencyThe text was updated successfully, but these errors were encountered: