From c20d08feed622876b3154cecafecf7487935e598 Mon Sep 17 00:00:00 2001 From: Italo Santos Date: Sat, 27 Feb 2021 05:39:58 -0300 Subject: [PATCH] feat: add pod backoff failure policy (#48) --- cli/cmd/kubernetes/job/bpf.go | 1 + cli/cmd/kubernetes/job/jvm.go | 1 + cli/cmd/kubernetes/job/python.go | 1 + 3 files changed, 3 insertions(+) diff --git a/cli/cmd/kubernetes/job/bpf.go b/cli/cmd/kubernetes/job/bpf.go index 59060f0..a907eed 100644 --- a/cli/cmd/kubernetes/job/bpf.go +++ b/cli/cmd/kubernetes/job/bpf.go @@ -62,6 +62,7 @@ func (b *bpfCreator) create(targetPod *apiv1.Pod, cfg *data.FlameConfig) (string Parallelism: int32Ptr(1), Completions: int32Ptr(1), TTLSecondsAfterFinished: int32Ptr(5), + BackoffLimit: int32Ptr(2), Template: apiv1.PodTemplateSpec{ ObjectMeta: commonMeta, Spec: apiv1.PodSpec{ diff --git a/cli/cmd/kubernetes/job/jvm.go b/cli/cmd/kubernetes/job/jvm.go index 7d34ba6..a25e854 100644 --- a/cli/cmd/kubernetes/job/jvm.go +++ b/cli/cmd/kubernetes/job/jvm.go @@ -56,6 +56,7 @@ func (c *jvmCreator) create(targetPod *apiv1.Pod, cfg *data.FlameConfig) (string Parallelism: int32Ptr(1), Completions: int32Ptr(1), TTLSecondsAfterFinished: int32Ptr(5), + BackoffLimit: int32Ptr(2), Template: apiv1.PodTemplateSpec{ ObjectMeta: commonMeta, Spec: apiv1.PodSpec{ diff --git a/cli/cmd/kubernetes/job/python.go b/cli/cmd/kubernetes/job/python.go index 02b512c..7017ae8 100644 --- a/cli/cmd/kubernetes/job/python.go +++ b/cli/cmd/kubernetes/job/python.go @@ -63,6 +63,7 @@ func (p *pythonCreator) create(targetPod *apiv1.Pod, cfg *data.FlameConfig) (str Parallelism: int32Ptr(1), Completions: int32Ptr(1), TTLSecondsAfterFinished: int32Ptr(5), + BackoffLimit: int32Ptr(2), Template: apiv1.PodTemplateSpec{ ObjectMeta: commonMeta, Spec: apiv1.PodSpec{