From 61a9d3a7056f46a0a7ba82e2e6c988b72070251f Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Wed, 4 Oct 2023 18:25:04 -0500 Subject: [PATCH] chore: Tweak job pod config to prevent restart on failure --- internal/util/cmd_setup.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/util/cmd_setup.go b/internal/util/cmd_setup.go index d60260da..568955c0 100644 --- a/internal/util/cmd_setup.go +++ b/internal/util/cmd_setup.go @@ -196,6 +196,7 @@ func createJob(cmd *cobra.Command, conf *config.Global, actionName string) error }, Spec: batchv1.JobSpec{ ActiveDeadlineSeconds: ptr.To(int64(24 * time.Hour.Seconds())), + BackoffLimit: ptr.To(int32(0)), Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ @@ -205,7 +206,7 @@ func createJob(cmd *cobra.Command, conf *config.Global, actionName string) error Labels: podLabels, }, Spec: corev1.PodSpec{ - RestartPolicy: corev1.RestartPolicyOnFailure, + RestartPolicy: corev1.RestartPolicyNever, TerminationGracePeriodSeconds: ptr.To(int64(0)), Affinity: &corev1.Affinity{ PodAffinity: &corev1.PodAffinity{