shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

Plugin should respect context - kubectl context and/or argocd-context

Open maxkadel opened this issue 5 months ago • 0 comments

Platform or tool

ArgoCD plugin

Desired or expected behavior

When I have the ArgoCD 1Password plugin installed, I am able to switch between ArgoCD contexts, and run commands on the desired context using standard kubernetes and ArgoCD commands.

Current behavior

When I have the ArgoCD 1Password plugin installed, I am not able to switch between ArgoCD contexts. Only the context where I originally used the 1Password plugin is connected to.

Relevant log output

# The active context for both argocd and kubectl are the local minikube node
➜ argocd context
CURRENT  NAME               SERVER
         argo.company.cloud  argo.company.cloud
*        localhost:8080     localhost:8080
# Even with the argocd-context and kube-context explicitly set to the local instance in the command, I get a response from the production instance
➜ argocd account get-user-info --argocd-context localhost:8080 --kube-context minikube
Logged In: true
Username: [email protected]
Issuer: https://argo.company.cloud/api/dex
Groups: company:Argo,company:Company
# If I comment out the following line in my ~/.config/op/plugins.sh file, the argocd-config works as expected
alias argocd="op plugin run -- argocd"
➜ argocd account get-user-info
Logged In: true
Username: admin
Issuer: argocd
Groups:

op CLI version

2.31.1

maxkadel avatar Jul 18 '25 17:07 maxkadel