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

Make ArgoCD CLI login preserve the port forward arguments to not need to specify them when running other commands #20565

Open
andrii-korotkov-verkada opened this issue Oct 28, 2024 · 6 comments · May be fixed by #22521
Assignees
Labels
component:cli Affects the Argo CD CLI enhancement New feature or request good first issue Good for newcomers

Comments

@andrii-korotkov-verkada
Copy link
Contributor

Summary

When people specify the --port-forward and --port-forward-namespace in the argocd login command, they should be preserved when running other commands, i.e. there should be no need to specify them again for each command.

Motivation

In the current state the port forwarding arguments need to be specified for each command run by the cli. Or, kubectl port forwarding should be used. This is rather cumbersome and it would be more convenient to save those params after login.

Proposal

Save port forward params in some cache after cli login, similar to how auth information can be saved.

@andrii-korotkov-verkada andrii-korotkov-verkada added the enhancement New feature or request label Oct 28, 2024
@andrii-korotkov-verkada
Copy link
Contributor Author

Some discussion background is in #20234

@todaywasawesome todaywasawesome added the component:cli Affects the Argo CD CLI label Oct 28, 2024
@csantanapr
Copy link
Member

you can use an environment variable, for example I use this

export ARGOCD_OPTS="--port-forward --port-forward-namespace argocd --grpc-web"

@andrii-korotkov-verkada andrii-korotkov-verkada added the good first issue Good for newcomers label Feb 26, 2025
@D0ri123
Copy link
Contributor

D0ri123 commented Mar 1, 2025

@andrii-korotkov-verkada
Can I work on this??

@andrii-korotkov-verkada
Copy link
Contributor Author

Sure!

@D0ri123
Copy link
Contributor

D0ri123 commented Mar 5, 2025

@andrii-korotkov-verkada I have a question. When implementing a feature that preserves arguments, would it be better to make it optional?

@andrii-korotkov-verkada
Copy link
Contributor Author

I don't know. My take would be to make it always used, but we can discuss at the contributors meeting https://docs.google.com/document/d/1xkoFkVviB70YBzSEa4bDnu-rUZ1sIFtwKKG1Uw8XsY8/edit?tab=t.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli Affects the Argo CD CLI enhancement New feature or request good first issue Good for newcomers
Projects
None yet
5 participants
@csantanapr @todaywasawesome @D0ri123 @andrii-korotkov-verkada and others