def __init__(self):
parser = argparse.ArgumentParser(
description="Deploys to kubernetes with azk.io",
usage='''deploy <command> [<args>]
Commands:
deploy Builds and pushes new images, and syncs Kubernetes.
push Builds and pushes new images, but doesn't update Kubernetes.
sync Creates/updates kubernetes resources, but doesn't build/push anything.
loadconfig Just check the kubernetes config and connectivity.
loadsource Just check that the project source is mounted properly, and generate proposed Kubernetes resources.
'''
)
parser.add_argument('command', help='Subcommand to run')
self.target_setup = None
self.api = None
args = parser.parse_args(sys.argv[1:])
coloredlogs.install(level=('DEBUG'), fmt='%(message)s', isatty=True)
if not hasattr(self, args.command):
parser.print_help()
exit(1)
getattr(self, args.command)()
评论列表
文章目录