-
Notifications
You must be signed in to change notification settings - Fork 4
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
Discussion: A fork, a merge, or something different? #9
Comments
@AaronFriel I wanted to play a bit with your implementation but could not find the repo. Is it private? |
@mhristache: https://github.com/AaronFriel/kubernetes-rs @AaronFriel: I took a good look at the repo when you opened this issue earlier, and meant to reply - but was unsure what was both useful and brief enough for a github comment thread. First, thanks :) It's a great and useful exploration. There's a bunch of conflated changes here, and I think it would be useful to tease them out separately:
More discussion welcome. |
Yes, I don't foresee any problems for that. The values are in the spec already ( |
This change adds `TypeMeta` and `ValueMeta` traits that are implemented for all resource types. The traits define the API version and kind of each resource automatically, so the corresponding fields have been removed from the resource types. The traits are derived from https://github.com/anguslees/kubernetes-rs based on the discussion in anguslees/kubernetes-rs#9
Thanks for replying! I haven't been checking this regularly, and I should have. I'm really happy to see this cooperation.
I found it helpful to use a more ergonomic API around the metadata accessing (
I already raised the topic with @Arnavion and I'll let their comment and WIP code speak for itself. I think this collaboration is great.
My original motivation for looking for a Rust crate implementation (and why I implemented a generic list watcher) was because I wanted to do a presentation for my company on Kubernetes, and wanted to demo what I think is its greatest strength: controllers/operators and custom resources. Sadly, the Go docs require lots of manual codegen (ugh, lack of generics), and those were the ones I found the most material on how to write a controller/operator. So I started doing the research on what these operations entail, and I think there is a significant opening for a great Kubernetes library to provide a few of these primitive operations (list watching, reflectors/informers in the Go CRD controller docs). My argument here would be: these are essential building blocks. They're also pay-for-what-you-use features, which fits with the Rust philosophy here. |
Just to elaborate on what I meant by opening. I think there is an opportunity to make Rust the best language for writing reliable abstractions on Kubernetes, even better than Go, because the generics, zero cost abstractions, and explicit error handling make it trivial to write a list watcher that never fails. The Go examples screw that up. There are many bug reports about controllers in use in production systems failing because controllers are written to rely on default timeout values, don't resume from failures, sporadically stop listening to events. I've experienced this multiple times even for controllers like This library with |
+1 to all that :) The challenge is time and competition with other priorities :/ |
There is a new kid on the block and it's using k8s-openapi :) |
This change adds a `Resource` trait that's implemented for all resource types. The trait defines the API version and kind of each resource automatically, so the corresponding fields have been removed from the resource types. The trait is derived from https://github.com/anguslees/kubernetes-rs based on the discussion in anguslees/kubernetes-rs#9
Now that @Arnavion added a @AaronFriel, do you plan on maintaining your fork? |
This crate's trait has one more function that the trait in Update: This is now done, with |
@ibotty I don't intend to maintain my fork unless @anguslees believes this project should not have a dependency on k8s-openapi. |
Context: @Arnavion has created the
k8s-openapi
package, and @anguslees created thekubernetes
package in this repository. The two should probably speak each other's language, if the goal is to support the ecosystem of Kubernetes without having to write custom serialization for every new release and API type.I forked this project a couple weeks ago and started working on what that might look like, and re-wrote the
client-watch.rs
example using features in nightly to show how ergonomic (or not) that could be. I'd really appreciate some review of this branch. A comparison reveals the large amounts of code changes, so perhaps a PR isn't the right way to handle this. I renamed the project for local development (and reserved the name on crates.io with a publish) for that reason, but also in anticipation that the changes are too significant or not the direction the other folks want.Anyway, that's enough said. I'd like to hear what the people I've tagged think about these changes, and what they would like to do with it.
The text was updated successfully, but these errors were encountered: