Skip to content
Merged
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
11 changes: 4 additions & 7 deletions deployer/dev_commands/develop/use_cluster_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ def ensure_single_kubeconfig_context():
)


@app.command(rich_help_panel=DEVELOPMENT)
@app.command(context_settings={"allow_extra_args": True}, rich_help_panel=DEVELOPMENT)
def use_cluster_credentials(
ctx: typer.Context,
cluster_name: str = typer.Argument(..., help="Name of cluster to operate on"),
commandline: str = typer.Argument(
"",
help="Optional shell command line to run after authenticating to this cluster",
),
):
"""
Pop a new shell or execute a command after authenticating to the given cluster using the deployer's credentials
Expand All @@ -66,6 +63,6 @@ def use_cluster_credentials(
# shell.
args = [os.environ["SHELL"], "-l"]
# If a command to execute is specified, just execute that and exit.
if commandline:
args += ["-c", commandline]
if ctx.args:
args.extend(("-c", " ".join(ctx.args)))
subprocess.check_call(args)