apache / opendal

Apache OpenDAL: access data freely.
https://opendal.apache.org
Apache License 2.0
3.26k stars 455 forks source link

service: add Kubernetes service support #4682

Open yangsoon opened 3 months ago

yangsoon commented 3 months ago

Kubernetes (https://kubernetes.io/docs/home/) is an open source container orchestration engine. However, for end users, you can also consider Kubernetes as a configuration center. For example, creating a Pod resource is akin to inserting a configuration into the storage of Kubernetes.

Here is an example of how Kubernetes (k8s) can be integrated with OpenDAL

  1. read a k8s object just same as executing the kubectl get pod testA command.
    op.read(pod.get_path())
  2. write a k8s object just same as executing the kubectl apply -f pod.yaml command.
    op.write(pod.get_path(), pod)
  3. delete a k8s object just like executing the kubectl delete pod test
    op.delete(pod.get_path())
  4. stat will return the metadata of k8s object

Last year, I implemented a tool https://github.com/yangsoon/kufu based on Rust that maps k8s (Kubernetes) objects to the local file system. In essence, it connects the file system's API to the k8s API. Therefore, I believe it is feasible to connect k8s to OpenDAL.

  1. kube rust client https://github.com/kube-rs/kube
yangsoon commented 3 months ago

If there are no problems with adding this service, maybe can assign to me. cc @Xuanwo @Zheaoli

nayihz commented 3 months ago

No offense. Is it really worth doing this? Does anybody really read/write k8s through opendal instead k8s client?

yangsoon commented 3 months ago

No offense. Is it really worth doing this? Does anybody really read/write k8s through opendal instead k8s client?

I strongly agree with your suggestion, so I also want to see what others think.

Xuanwo commented 3 months ago

Is it really worth doing this?

From my perspective, I don't consider whether it's worth it or not.

Instead, I focus on whether there are contributors interested in implementing and maintaining it. All services in OpenDAL are optional, and we will timely remove any that are poorly maintained.

As long as this service can be built, tested, and doesn't hinder our release process, I'm happy to integrate it.

So, if @yangsoon want to implement this, please feel free to get start.

yangsoon commented 3 months ago

Is it really worth doing this?

From my perspective, I don't consider whether it's worth it or not.

Instead, I focus on whether there are contributors interested in implementing and maintaining it. All services in OpenDAL are optional, and we will timely remove any that are poorly maintained.

As long as this service can be built, tested, and doesn't hinder our release process, I'm happy to integrate it.

So, if @yangsoon want to implement this, please feel free to get start.

thanks,i will start as soon as possible