Skip to content

Commit

Permalink
feat(cli): expose existing_token client property
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Coufal <tcoufal@redhat.com>
  • Loading branch information
tumido committed Nov 22, 2024
1 parent 2e05b3d commit c215c51
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit c215c51

Please sign in to comment.