Skip to content

Commit

Permalink
allow to set restart_policy when creating onprem
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Jun 5, 2024
1 parent e9d8db1 commit 3bc95aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ailib/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ def create_onprem(overrides={}, debug=False):
response = urllib.request.urlopen(pod_url).read().decode('utf-8')
response = response.replace('latest', onprem_version).replace(f'centos7:{onprem_version}',
'centos7:latest')
restart_policy = overrides.get('restart_policy')
if restart_policy is not None and restart_policy == 'Always':
response.replace('Never', 'Always')
p.write(response)
if os.path.exists('configmap.yml'):
info("Using existing configmap.yml")
Expand Down

0 comments on commit 3bc95aa

Please sign in to comment.