Replies: 7 comments 7 replies
-
Thanks for raising this. I'm going to comment here only about moving from Armada jobs to a Kubernetes jobs- I'll leave the discussion on Queue Conversion to CRD to someone more knowledgeable than myself. As you note, there are two places in the code where we currently use pods and could move to using jobs; the podspec present in our public api and the pods that we schedule onto the K8s clusters. Note that these two uses are independent. For example we could move our public api to take job objects while continuing to schedule pods or vice versa. As a result I'll discuss each use case separately. Use of Job Object As The K8s Object Armada Schedules On The Cluster Use of Job Objects In the Armada Api
I think in this case the best thing to do is to monitor what happens with K8s Jobs (and also with other related concepts such as podgroups) to see if they evolve to a point where they offer enough benefits/are stable enough that using them in the Armada API pffers a compelling case. Once this happens (and I'm hopeful in this case), it should be relatively straightforward to provide an API making use of them, especially if the core Armada functionality has reached a point where we no longer have any big outstanding issues. |
Beta Was this translation helpful? Give feedback.
-
Having Armada queues as K8s native objects seems like a nice feature. My thought is that it will require a fair bit of work. The source of truth for generating CRDs is Go structs with extra metadata encoded in comments. Currently, as you say, it's protobuf, so this will need to be translated. The clients would have to be regenerated, everything using them would have to be updated. I think it is worth doing, but it needs careful planning. |
Beta Was this translation helpful? Give feedback.
-
Armada currently works like this: A job controller (such as Kueue) is a system that creates pods. With a bit of extra plumbing, there's no reason those pods can't be passed through Armada instead of being sent straight to kube-scheduler. In this way, we'd benefit from work done on job controllers without needing to implement our own. I think Armada's niche is and should be efficiently scheduling lots of pods across many clusters. I think having jobs be the unit that Armada schedules is wrong for the reasons given by @d80tb7 and @jakexks and I think Armada accepting jobs instead of pods is wrong for the reason given above. I think having queues be CRDs would be nice. However, I think it may require a fair bit of work (as suggested by @jakexks ) and I think we can significantly improve how easy it is to setup and use Armada without making queues be CRDs. |
Beta Was this translation helpful? Give feedback.
-
Re etcd performance, I believe improving it is far from trivial and I doubt us spending time on it would be time well spent. Recall that etcd implements total order broadcast via the Raft protocol, and key-value storage is implemented on top of total order broadcast. As a result, etcd provides excellent consistency, durability, and availability guarantees, but low throughput. That's a deliberate design trade-off. Other technologies make other design trade-offs to achieve higher throughput. |
Beta Was this translation helpful? Give feedback.
-
So from what I am hearing: Job API is out. Too much pressure on ETCD and that is bad. For queueing, I hear that it would be nice but it may be a lot of work as queue's are already used. Some areas that could make queue CRD more interesting is that I'd like to start implementing CRUD APIs for Queue (Create/Delete/Upgrade/Patch/List) and I think we can get away from storing our queue objects in Redis. I don't see any reason why we can't convert this to a CRD and get all the benefits of REST-APIs. Right now I was told implementing a list of queues is difficult with our current data structure and I don't think we have patch/apply either. These APIs should be simple to implement with a CRD. |
Beta Was this translation helpful? Give feedback.
-
@d80tb7 followed up with me offline and gave me a list of features that he would like from the JobApi:
|
Beta Was this translation helpful? Give feedback.
-
Queue Conversion to CRD
A major goal is to make deployment/support of Armada much easier. Currently, our queue object is a custom object defined in our submit.proto file. We are missing key lifecycle methods. Common operations such as editing or getting a list of created queues are missing from our API. We implement this API separately and store it in our internal data store for Armada. This epic should aim to start storing these objects in the api-server in Kubernetes.
This epic will include designing the new queue api and storing it as part of Kubernetes. This should allow us to support creation/managing of queue objects with standard kubernetes tooling rather than having to implement these features ourselves.
Long Term benefits could be tighter integration of queues with Kubernetes RBAC. It will also play nicer with creation of objects since we can use Kubernets APIs as is for deploying queue objects.
Convert Armada Job to be a Kubernetes Job
A bad practice for running Kubernetes workloads is to schedule naked pods on your cluster. Kubernetes is designed to work with higher level controllers that verify the contract of your application. Think of a deployment object with x amount of replicas. Kubernetes will always make sure your object has x amount of replicas so if a node goes down, kubernetes will restart those objects.
This pattern can be extended to batch jobs by using the job controller. There is some momentum around the Job API in native kubernetes. The job controller does provide retrying ability and should allow scheduling of pods on healthy nodes. This also allows us to use Job features that are being released to better support batch workloads. We also can take advantage of features like indexed jobs, retriably jobs, automatic retry of preemptions jobs. Moving to a Job API allows us to take advantage of future features that we can add to the kubernetes project.
I see two options for implementation:
Beta Was this translation helpful? Give feedback.
All reactions