diff --git a/app/org/thp/cortex/services/K8sJobRunnerSrv.scala b/app/org/thp/cortex/services/K8sJobRunnerSrv.scala index 1b0a6f68a..d333ea17a 100644 --- a/app/org/thp/cortex/services/K8sJobRunnerSrv.scala +++ b/app/org/thp/cortex/services/K8sJobRunnerSrv.scala @@ -23,6 +23,7 @@ class K8sJobRunnerSrv( persistentVolumeClaimName: Option[String], // if not provided k8s runner is unavailable extraLabels: Map[String, String], podSecurityContext: Option[PodSecurityContext], + backoffLimit: Int, implicit val system: ActorSystem ) { @@ -34,6 +35,7 @@ class K8sJobRunnerSrv( config.getOptional[String]("job.kubernetes.persistentVolumeClaimName"), K8sJobRunnerSrv.parseLabels(config), K8sJobRunnerSrv.parsePodSecurityContext(config), + config.getOptional[Int]("job.kubernetes.backoffLimit").getOrElse(0), system: ActorSystem ) @@ -93,6 +95,7 @@ class K8sJobRunnerSrv( .withLabels(allLabels.asJava) .endMetadata() .withNewSpec() + .withBackoffLimit(backoffLimit) .withNewTemplate() .withNewMetadata() .withLabels(allLabels.asJava)