From f7b37aa54ccc47d5e895fbedec313650c04f4481 Mon Sep 17 00:00:00 2001 From: bstadlbauer <11799671+bstadlbauer@users.noreply.github.com> Date: Thu, 29 Jun 2023 13:49:35 +0200 Subject: [PATCH] Set scheduler restart policy to `Always` (#367) Signed-off-by: Bernhard Stadlbauer <11799671+bstadlbauer@users.noreply.github.com> --- go/tasks/plugins/k8s/dask/dask.go | 2 +- go/tasks/plugins/k8s/dask/dask_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/tasks/plugins/k8s/dask/dask.go b/go/tasks/plugins/k8s/dask/dask.go index d1167e076..5db33aedf 100755 --- a/go/tasks/plugins/k8s/dask/dask.go +++ b/go/tasks/plugins/k8s/dask/dask.go @@ -237,7 +237,7 @@ func createSchedulerSpec(cluster plugins.DaskScheduler, clusterName string, defa return &daskAPI.SchedulerSpec{ Spec: v1.PodSpec{ - RestartPolicy: v1.RestartPolicyNever, + RestartPolicy: v1.RestartPolicyAlways, Containers: []v1.Container{ { Name: "scheduler", diff --git a/go/tasks/plugins/k8s/dask/dask_test.go b/go/tasks/plugins/k8s/dask/dask_test.go index b9e9c8846..31115d06f 100644 --- a/go/tasks/plugins/k8s/dask/dask_test.go +++ b/go/tasks/plugins/k8s/dask/dask_test.go @@ -228,7 +228,7 @@ func TestBuildResourceDaskHappyPath(t *testing.T) { Protocol: "TCP", }, } - assert.Equal(t, v1.RestartPolicyNever, schedulerSpec.RestartPolicy) + assert.Equal(t, v1.RestartPolicyAlways, schedulerSpec.RestartPolicy) assert.Equal(t, defaultTestImage, schedulerSpec.Containers[0].Image) assert.Equal(t, defaultResources, schedulerSpec.Containers[0].Resources) assert.Equal(t, []string{"dask-scheduler"}, schedulerSpec.Containers[0].Args)