diff --git a/.github/workflows/operator.yaml b/.github/workflows/operator.yaml index 5a8bb230f..3eec45023 100644 --- a/.github/workflows/operator.yaml +++ b/.github/workflows/operator.yaml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v2 - name: Lint Helm Chart run: helm lint dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator - - name: Download Pluto + - name: Install Pluto uses: FairwindsOps/pluto/github-action@v5.11.1 - name: Check for deprecated APIs run: helm template --include-crds dask-operator dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator | pluto detect - diff --git a/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/README.md b/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/README.md index cd3552100..1b4530df2 100644 --- a/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/README.md +++ b/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/README.md @@ -35,6 +35,7 @@ The following table lists the configurable parameters of the Dask-kubernetes-ope | `nodeSelector` | Node selector | `{}` | | `tolerations` | Tolerations | `[]` | | `affinity` | Affinity | `{}` | +| `priorityClassName` | Priority class | `null` | | `kopfArgs` | Command line flags to pass to kopf on start up | `["--all-namespaces"]` | | `metrics.scheduler.enabled` | Enable scheduler metrics. Pip package [prometheus-client](https://pypi.org/project/prometheus-client/) should be present on scheduler. | `false` | | `metrics.scheduler.serviceMonitor.enabled` | Enable scheduler servicemonitor. | `false` | diff --git a/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/templates/deployment.yaml b/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/templates/deployment.yaml index f4f22a9db..285259c0c 100644 --- a/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/templates/deployment.yaml +++ b/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/templates/deployment.yaml @@ -68,3 +68,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.priorityClassName }} + priorityClassName: {{ . | quote }} + {{- end }} diff --git a/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/values.yaml b/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/values.yaml index d58264254..d4d863a55 100644 --- a/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/values.yaml +++ b/dask_kubernetes/operator/deployment/helm/dask-kubernetes-operator/values.yaml @@ -52,6 +52,8 @@ tolerations: [] # Tolerations affinity: {} # Affinity +priorityClassName: null # Priority class + kopfArgs: # Command line flags to pass to kopf on start up - --all-namespaces diff --git a/dask_kubernetes/operator/kubecluster/kubecluster.py b/dask_kubernetes/operator/kubecluster/kubecluster.py index 575fdef11..d5891ab4a 100644 --- a/dask_kubernetes/operator/kubecluster/kubecluster.py +++ b/dask_kubernetes/operator/kubecluster/kubecluster.py @@ -115,6 +115,9 @@ class KubeCluster(Cluster): used to create the cluster instead of generating one from the other keyword arguments. scheduler_forward_port: int (optional) The port to use when forwarding the scheduler dashboard. Will utilize a random port by default + quiet: bool + If enabled, suppress all printed output. + Defaults to ``False``. **kwargs: dict Additional keyword arguments to pass to LocalCluster @@ -175,6 +178,7 @@ def __init__( jupyter: bool = False, loop: Optional[IOLoop] = None, asynchronous: bool = False, + quiet: bool = False, **kwargs, ): name = dask.config.get("kubernetes.name", override_with=name) @@ -258,7 +262,9 @@ def __init__( self._rich_spinner = Spinner("dots", speed=0.5) self._startup_component_status: dict = {} - super().__init__(name=name, loop=loop, asynchronous=asynchronous, **kwargs) + super().__init__( + name=name, loop=loop, asynchronous=asynchronous, quiet=quiet, **kwargs + ) # If https://github.com/dask/distributed/pull/7941 is merged we can # simplify the next 8 lines to ``if not self.called_from_running_loop:`` diff --git a/requirements.txt b/requirements.txt index d7a850edf..665275ceb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ kubernetes-asyncio>=12.0.1 kopf>=1.35.3 pykube-ng>=22.9.0 rich>=12.5.1 -kr8s>=0.9.0 +kr8s==0.9.0