Skip to content

Commit

Permalink
Add k8s glue default restartPolicy=Never to template to prevent pods …
Browse files Browse the repository at this point in the history
…from restarting
  • Loading branch information
allegroai committed Apr 28, 2021
1 parent 3ec2a3a commit 4f18bb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clearml_agent/glue/k8s.py
Expand Up @@ -446,6 +446,7 @@ def _kubectl_apply(self, create_clearml_conf, docker_image, docker_args, labels,
template['metadata']['name'] = name
template.setdefault('spec', {})
template['spec'].setdefault('containers', [])
template['spec'].setdefault('restartPolicy', 'Never')
if labels:
labels_dict = dict(pair.split('=', 1) for pair in labels)
template['metadata'].setdefault('labels', {})
Expand Down

0 comments on commit 4f18bb7

Please sign in to comment.