Skip to content

Commit

Permalink
fix: reproduce
Browse files Browse the repository at this point in the history
  • Loading branch information
tylergu committed Jun 21, 2022
1 parent bc7e77a commit 1bb4855
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions reproduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from constant import CONST
from deploy import Deploy, DeployMethod
from exception import UnknownDeployMethodError
from common import kind_load_images
from common import kind_load_images, kubectl

if __name__ == '__main__':
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -46,12 +46,13 @@
else:
raise UnknownDeployMethodError()

construct_kind_cluster(CONST.K8S_VERSION)
construct_kind_cluster('test', CONST.K8S_VERSION)
with open(args.context, 'r') as context_fin:
context = json.load(context_fin)
context['preload_images'] = set(context['preload_images'])
kind_load_images(context['preload_images'])
deployed = deploy.deploy_with_retry(context)
kind_load_images(context['preload_images'], 'test')
deployed = deploy.deploy_with_retry(context, 'test')

cmd = ['kubectl', 'apply', '-f', args.seed, '-n', context['namespace']]
subprocess.run(cmd)
kubectl(['apply', '-f', args.seed, '-n', context['namespace']], 'test')

0 comments on commit 1bb4855

Please sign in to comment.