This proposal is about having a Kubernetes operator (see here and here). The scope of the operator would be the following:
- Defining a CRD for a
CeleryApplication. This resource would contain the configuration for the cluster (e.g., container resource requests/limits, number of replicas), Celery configuration (e.g., broker and result backend configuration), Docker image with the code and launch parameters (e.g., location of the code inside the container, virtualenv)
- As an alternative, the CRD could include a URL for downloading a Python package with the code of the application, instead of the Docker image.
- The operator itself would manage the control loop of the
CeleryApplication CRD, and would spawn a Kubernetes Deployment for the cluster, and also a Deployment for running flower. It would also create a Kubernetes Service so that we can access the flower UI/API
- Broker and result backend configuration would be out of scope of the operator, these have to be created before hand. A set of
CeleryApplication resources should be able to use a shared broker and result backend, but they can pick their own broker configuration too.
This idea is inspired by the Flink Kubernetes Operator developed by Lyft: https://github.com/lyft/flinkk8soperator
This proposal is about having a Kubernetes operator (see here and here). The scope of the operator would be the following:
CeleryApplication. This resource would contain the configuration for the cluster (e.g., container resource requests/limits, number of replicas), Celery configuration (e.g., broker and result backend configuration), Docker image with the code and launch parameters (e.g., location of the code inside the container, virtualenv)CeleryApplicationCRD, and would spawn a KubernetesDeploymentfor the cluster, and also aDeploymentfor runningflower. It would also create a KubernetesServiceso that we can access theflowerUI/APICeleryApplicationresources should be able to use a shared broker and result backend, but they can pick their own broker configuration too.This idea is inspired by the Flink Kubernetes Operator developed by Lyft: https://github.com/lyft/flinkk8soperator