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')
评论列表
文章目录