Open r0bj opened 3 years ago
Does setting ARGOCD_OPTS="--port-forward-namespace argocd"
help?
WIth using ARGOCD_OPTS="--port-forward-namespace argocd"
is the same effect.
What about doing both --port-forward and --port-forward-namespace argocd in the same command?
Using both --port-forward and --port-forward-namespace seems working, is it the intention? If so, what would be the logic to use --port-forward-namespace
without wanting to use port forward?
Can't say it makes sense, I just know it works. I didn't do it that way, but I did get login to work for port forward, so that's how I know.
From my read to the code, it looks like it is intentional because you are allowed to enable port forwarding with port-forward-namespace = empty string. In this case, the port forward namespace is default to the namespace in the client config.
For other argocd
subcommands than login
it's enough to use just --port-forward-namespace=argocd
. But for argocd login
we need to use both --port-forward-namespace=argocd
and --port-forward
. It's seems quite inconsistent.
Stumbled across this today. For the login I need to have the option --port-forward
in place.
argocd login --port-forward --plaintext --port-forward-namespace argocd
However, it is not necessary for listing my existing apps
argocd app list --port-forward-namespace argocd
Also, this feels off:
$ argocd login --port-forward --port-forward-namespace argocd
Username: admin
Password:
'admin:login' logged in successfully
Context 'port-forward' updated
Note the last line: "Context 'port-forward' updated". The context got the name "port-forward". Sounds more like a side effect than the intention of the code, imo. Sounds like that piece of logic needs some looking over. :)
If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.
Checklist:
argocd version
.Describe the bug
argocd login
is not accepting parameter--port-forward-namespace
To Reproduce
All those commands returns argocd login usage help:
Expected behavior
I'm able to login with command
argocd --port-forward-namespace=argocd login
Version