Skip to content
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

Kubebuilder support for Rust #2969

Closed
26tanishabanik opened this issue Sep 26, 2022 · 13 comments
Closed

Kubebuilder support for Rust #2969

26tanishabanik opened this issue Sep 26, 2022 · 13 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@26tanishabanik
Copy link

What do you want to happen?

While building controllers in Rust, I realised, there are many features missing unlike building controllers in Go, components like, automatic CRD generation, RBAC roles, automatic config file generation and so on.
Implementing a similar feature like Kubebuilder in rust would be great.

Any help would be appreciated, thanks

Extra Labels

No response

@26tanishabanik 26tanishabanik added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 26, 2022
@varshaprasad96
Copy link
Member

@26tanishabanik this is an interesting feature request. Rust is definitely becoming popular. In order to support more languages and facilitate the extensibility of KB to be used as a library, KB plugins phase 2 plugins were introduced (#2600). This will allow users to develop plugins that support operator development in a language agnostic way. However, though the skeleton of the project can be scaffolded, the support for writing controller libraries (like controller-runtime, tools) in different languages is a topic of discussion. Will leave this for the upcoming community meeting.

@26tanishabanik
Copy link
Author

@varshaprasad96 , Thank you for the quick response. It would be great if this issue can be discussed in the upcoming community meeting.
I have started some development from my side too. Would love to hear, about your thoughts

@camilamacedo86
Copy link
Member

Hi @26tanishabanik,

As @varshaprasad96 described KubeBuilder is also a LIB that can help out developers create their tools and plugins such as to support other languages. A good example is Operator-SDK which uses KubeBuilder as a lib and can be focused on providing helpers to integrate the projects with OLM (https://olm.operatorframework.io/) as provide options to create projects using Ansible/Helm as well.

In this way, our purpose is to improve KubeBuilder as a lib and invest effort to help those that would like to provide solutions for other languages. However, it is not the goal of KubeBuilder to provide a lot of plugins or aways for to people create projects in other languages.

We need to have a focus and scope pre-defined so that we can be good in the main purpose of this project. Its scope is to help out users using Golang which is the language used to implement Kubernetes and Controller-Runtime (lib used to leverage, see the README), and allow others to use Kubebuilder as API so that they can create their own tools supporting other languages (as Operator-SDK) or their own plugins that can be used as external options with SDK, Kubebuilder and any other tool created based on KubeBuilder by taking the advantage of the plugin phase 2 implementation shared by @varshaprasad96

@everettraven
Copy link
Contributor

Hi @26tanishabanik - just to echo what @camilamacedo86 and @varshaprasad96 mentioned, I feel like the ask of creating the tooling to support specific languages besides Go is beyond the scope of the work that the maintainers of Kubebuilder are likely to be able to take on.

Instead, we have identified the need for users of Kubebuilder and the community to be able to extend it to suit their needs. With this in mind, we have begun working on Phase 2 Plugins in an attempt to allow external plugins to be created that can still be used with Kubebuilder. For this we are still working on creating tests and documentation on how to properly create these external plugins. The functionality does currently exist in Kubebuilder and I am happy to answer any questions that you may have regarding phase 2 plugins.

As @varshaprasad96 also mentioned, another thing to consider for this is the development of libraries to support and ease the creation of controllers in new languages such as controller-runtime that we use in Go controllers. This is something else the community would need to develop and is something that would be out of scope for the work of Kubebuilder maintainers.

I think overall it is a great idea and I would love to see the language options for developing controllers continue to grow, however this would - in my opinion - ultimately be something that community members such as yourself would end up developing.

@26tanishabanik
Copy link
Author

26tanishabanik commented Sep 27, 2022

Thank you so much @camilamacedo86 , @varshaprasad96 , @everettraven , for your valuable inputs, so, I was thinking, if I can get inputs on my development for kubebuilder in rust, if possible?

@everettraven
Copy link
Contributor

@26tanishabanik I would be happy to take a look and evaluate the general concepts, but I wouldn't be able to give much insight on the actual Rust code itself as I am not familiar with Rust

@26tanishabanik
Copy link
Author

Thank you for such a quick response, @everettraven , yes, please do suggest and evaluate the general concepts, that will also help me

@everettraven
Copy link
Contributor

@26tanishabanik would you mind sharing a link that I can use to take a look?

@26tanishabanik
Copy link
Author

26tanishabanik commented Sep 27, 2022

@everettraven , sure, I can share a link, though it's very raw right now, I mean, not very neat, I hope that is okay. If you don't mind, can I do it tomorrow, when I open my laptop?

@everettraven
Copy link
Contributor

@26tanishabanik Sure thing, no rush!

@26tanishabanik
Copy link
Author

Thanks a lot @everettraven

@26tanishabanik
Copy link
Author

@everettraven , This is the repo https://github.com/26tanishabanik/kubebuilder-rust-poc
You can tell me, from what modules or point from where starting would be easier, right now it's a bit haphazard, for me

@camilamacedo86
Copy link
Member

camilamacedo86 commented Sep 28, 2022

HI @26tanishabanik,

To create a plugin based on any other language, I think would be nice you check the Ansible/Helm plugins implementations in Operator-SDK as an example, see:

Also, based on all comments I think we can close this one as deferred and we do not need to bring it to the next meeting. However, please feel free to re-open or add the topic in the next meeting if you wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants