-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
This is my take on version comparison #24
Conversation
Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
I think this makes sense. It looks very similar to the code we have in discovery. I am sort of inclined to clean that up and make it public, but it's also not a particularly big deal to have this duplicated here initially. |
Quite similar indeed. So, let me know how would you like to proceed. |
I kind of thing it's ok to export The sort order is what we want, and while it's the opposite of what we want, it was chosen that way so we could .sort() and pick the first (as the most latest version): https://github.com/kube-rs/kube-rs/blob/120d0001ce58eb18ac59d2a9da1bf8514bc8058c/kube-client/src/discovery/apigroup.rs#L90-L95 |
Probably need to add a line of documentation about the order in the public docs though - it's currently only in the tests. Do you want to have a go at making a PR for this in kube-rs? It will make this slower to get out (we just released 0.65.0), so happy with some copy pasting from there in the mean time if you need this. |
Took me some time to get back to this. Sure, I can go via |
Yes, I will try to move the |
There is a branch now in kube-rs/kube#764 which exposes |
superseded by #27 |
If this makes sense I'll add finding the best version if no
--api-version
providedRelated to #23