deploy.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:docker-deploy-kubernetes 作者: paralin 项目源码 文件源码
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)()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号