Skip to content

Commit

Permalink
openshift: create autoapprover cron asap
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Apr 27, 2020
1 parent e29c8b3 commit 31fae54
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions kvirt/openshift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ def create(config, plandir, cluster, overrides):
config.plan(cluster, inputfile='%s/cloud.yml' % plandir, overrides=overrides)
call('openshift-install --dir=%s wait-for bootstrap-complete || exit 1' % clusterdir, shell=True)
todelete = ["%s-bootstrap" % cluster, "%s-bootstrap-helper" % cluster]
call("oc adm taint nodes -l node-role.kubernetes.io/master node-role.kubernetes.io/master:NoSchedule-", shell=True)
pprint("Deploying certs autoapprover cronjob", color='blue')
autoapprover = config.process_inputfile(cluster, "%s/autoapprovercron.yml" % plandir, overrides=data)
with open("%s/autoapprovercron.yml" % clusterdir, 'w') as f:
f.write(autoapprover)
call("oc create -f %s/autoapprovercron.yml" % clusterdir, shell=True)
if platform in virtplatforms:
wait_time = 180 / masters
pprint("Waiting %ss before retrieving workers ignition data" % wait_time, color='blue')
Expand All @@ -525,13 +531,6 @@ def create(config, plandir, cluster, overrides):
if 'name' in overrides:
del overrides['name']
config.plan(cluster, inputfile='%s/workers.yml' % plandir, overrides=overrides)
call("oc adm taint nodes -l node-role.kubernetes.io/master node-role.kubernetes.io/master:NoSchedule-", shell=True)
pprint("Deploying certs autoapprover cronjob", color='blue')
autoapprover = config.process_inputfile(cluster, "%s/autoapprovercron.yml" % plandir, overrides=data)
with open("%s/autoapprovercron.yml" % clusterdir, 'w') as f:
f.write(autoapprover)
call("oc create -f %s/autoapprovercron.yml ; oc apply -f %s/autoapprovercron.yml" % (clusterdir, clusterdir),
shell=True)
if not minimal:
installcommand = 'openshift-install --dir=%s wait-for install-complete' % clusterdir
installcommand = "%s | %s" % (installcommand, installcommand)
Expand Down

0 comments on commit 31fae54

Please sign in to comment.