Skip to content

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

@maxkadel

Description

@maxkadel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions