shell.py 文件源码

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

项目:armada 作者: att-comdev 项目源码 文件源码
def main(ctx, debug, api, url, token):
    """
    Multi Helm Chart Deployment Manager

    Common actions from this point include:

    \b
    $ armada apply
    $ armada test
    $ armada tiller
    $ armada validate

    Environment:

        \b
        $TOKEN set auth token
        $HOST  set armada service host endpoint

    This tool will communicate with deployed Tiller in your Kubernetes cluster.
    """

    if not ctx.obj:
        ctx.obj = {}

    if api:
        if not url or not token:
            raise click.ClickException(
                'When api option is enable user needs to pass url')
        else:
            ctx.obj['api'] = api
            parsed_url = urlparse(url)
            ctx.obj['CLIENT'] = ArmadaClient(
                ArmadaSession(
                    host=parsed_url.netloc,
                    scheme=parsed_url.scheme,
                    token=token)
            )

    log.register_options(CONF)

    if debug:
        CONF.debug = debug

    log.set_defaults(default_log_levels=CONF.default_log_levels)
    log.setup(CONF, 'armada')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号