Skip to content

Commit 365826e

Browse files
committed
feat(cli): expose existing_token client property
Signed-off-by: Tomas Coufal <tcoufal@redhat.com>
1 parent 2e05b3d commit 365826e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

sdk/RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Current Version (in development)
22

33
## Features
4+
* Expose `--existing-token` flag in `kfp` CLI to allow users to provide an existing token for authentication. [\#11400](https://github.com/kubeflow/pipelines/pull/11400)
45

56
## Breaking changes
67

sdk/python/kfp/cli/cli.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def _install_completion(shell: str) -> None:
8585
@click.option(
8686
'--other-client-secret',
8787
help=parsing.get_param_descr(client.Client, 'other_client_secret'))
88+
@click.option(
89+
'--existing-token',
90+
help=parsing.get_param_descr(client.Client, 'existing_token'))
8891
@click.option(
8992
'--output',
9093
type=click.Choice(list(map(lambda x: x.name, OutputFormat))),
@@ -94,8 +97,8 @@ def _install_completion(shell: str) -> None:
9497
@click.pass_context
9598
@click.version_option(version=kfp.__version__, message='%(prog)s %(version)s')
9699
def cli(ctx: click.Context, endpoint: str, iap_client_id: str, namespace: str,
97-
other_client_id: str, other_client_secret: str, output: OutputFormat,
98-
show_completion: str, install_completion: str):
100+
other_client_id: str, other_client_secret: str, existing_token: str,
101+
output: OutputFormat, show_completion: str, install_completion: str):
99102
"""Kubeflow Pipelines CLI."""
100103
if show_completion:
101104
click.echo(_create_completion(show_completion))
@@ -113,6 +116,7 @@ def cli(ctx: click.Context, endpoint: str, iap_client_id: str, namespace: str,
113116
# Do not create a client for these subcommands
114117
return
115118
ctx.obj['client'] = client.Client(endpoint, iap_client_id, namespace,
116-
other_client_id, other_client_secret)
119+
other_client_id, other_client_secret,
120+
existing_token)
117121
ctx.obj['namespace'] = namespace
118122
ctx.obj['output'] = output

0 commit comments

Comments
 (0)