Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): expose existing_token client property #11400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions sdk/python/kfp/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def _install_completion(shell: str) -> None:
@click.option(
'--other-client-secret',
help=parsing.get_param_descr(client.Client, 'other_client_secret'))
@click.option(
'--existing-token',
help=parsing.get_param_descr(client.Client, 'existing_token'))
@click.option(
'--output',
type=click.Choice(list(map(lambda x: x.name, OutputFormat))),
Expand All @@ -94,8 +97,8 @@ def _install_completion(shell: str) -> None:
@click.pass_context
@click.version_option(version=kfp.__version__, message='%(prog)s %(version)s')
def cli(ctx: click.Context, endpoint: str, iap_client_id: str, namespace: str,
other_client_id: str, other_client_secret: str, output: OutputFormat,
show_completion: str, install_completion: str):
other_client_id: str, other_client_secret: str, existing_token: str,
output: OutputFormat, show_completion: str, install_completion: str):
"""Kubeflow Pipelines CLI."""
if show_completion:
click.echo(_create_completion(show_completion))
Expand All @@ -113,6 +116,7 @@ def cli(ctx: click.Context, endpoint: str, iap_client_id: str, namespace: str,
# Do not create a client for these subcommands
return
ctx.obj['client'] = client.Client(endpoint, iap_client_id, namespace,
other_client_id, other_client_secret)
other_client_id, other_client_secret,
existing_token)
ctx.obj['namespace'] = namespace
ctx.obj['output'] = output
Loading