Skip to content

Commit

Permalink
Merge pull request #2452 from kayibal/kubernetes-fixes
Browse files Browse the repository at this point in the history
Kubernetes: Don't set activeDeadlineSeconds by default
  • Loading branch information
yonromai authored Jul 9, 2018
2 parents 551df14 + 265ebf8 commit 584ccbb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions luigi/contrib/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def active_deadline_seconds(self):
Time allowed to successfully schedule pods.
See: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-termination-and-cleanup
"""
return 100
return None

@property
def kubernetes_config(self):
Expand Down Expand Up @@ -329,7 +329,6 @@ def run(self):
}
},
"spec": {
"activeDeadlineSeconds": self.active_deadline_seconds,
"backoffLimit": self.backoff_limit,
"template": {
"metadata": {
Expand All @@ -339,6 +338,9 @@ def run(self):
}
}
}
if self.active_deadline_seconds is not None:
job_json['spec']['activeDeadlineSeconds'] = \
self.active_deadline_seconds
# Update user labels
job_json['metadata']['labels'].update(self.labels)
# Add default restartPolicy if not specified
Expand Down

0 comments on commit 584ccbb

Please sign in to comment.