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

Config issue or bug ... using ArgoCD #1242

Open
cmoulliard opened this issue May 8, 2024 · 3 comments
Open

Config issue or bug ... using ArgoCD #1242

cmoulliard opened this issue May 8, 2024 · 3 comments
Labels
jira Sync this issue with Jira status/triage

Comments

@cmoulliard
Copy link

Issue

I created a proxy endpoint to access argocd when I launch backstage top of the main branch (commit: f996bf6) of this project: backstage-showcase but I cannot access argocd stuff

and see this message within the browser dev console:

XHR - http://localhost:7007/api/proxy/argocd/api/applications/quarkus-app-rhdh-1-bootstrap - 401 Unauthorized.

Do we have to configure something specifically ?

Here is how I configured it

proxy:
  skipInvalidProxies: true
  endpoints:
    '/argocd/api':
      # url to the api of your hosted argoCD instance
      target: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/api/v1/
      changeOrigin: true
      # this line is required if your hosted argoCD instance has self-signed certificate
      secure: false
      headers:
        Cookie:
          $env: "argocd.token=<ARGOCD_AUTH_TOKEN>"

argocd:
  baseUrl: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/
  username: admin
  password: XXXXXXXXXXXXXX
  appLocatorMethods:
    - type: config
      instances:
        - name: argocdQShift
          url: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/ 
@github-actions github-actions bot added the jira Sync this issue with Jira label May 8, 2024
@karthikjeeyar
Copy link
Contributor

karthikjeeyar commented Jun 14, 2024

@cmoulliard Can you try passing the token key/value in the instances array ?

argocd:
  baseUrl: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/
  username: admin
  password: XXXXXXXXXXXXXX
  appLocatorMethods:
    - type: config
      instances:
        - name: argocdQShift
          url: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/ 
          token: <your-token>

Or the other option is to pass the username and password inside instances array like below

argocd:
 appLocatorMethods:
   - type: 'config'
     instances:
       - name: main
         url: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/ 
         username: <username>
         password: <your-pwd>

@cmoulliard
Copy link
Author

Can you try passing the token key/value in the instances array ?

I don't configure anymore the proxy and use only username/password which is working fine

argocd:
 appLocatorMethods:
   - type: 'config'
     instances:
       - name: main
         url: https://openshift-gitops-server-openshift-gitops.apps.qshift.snowdrop.dev/ 
         username: <username>
         password: <your-pwd>

@karthikjeeyar
Copy link
Contributor

@cmoulliard Can we close this issue if this working for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira Sync this issue with Jira status/triage
Projects
None yet
Development

No branches or pull requests

2 participants