Skip to content

Allow to save proxy information in credentials template #11351

@the-technat

Description

@the-technat

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

When looking at the UI for connecting a Repo and then saving this as credentials template, one can set the proxy:

image

Other than the fields above the proxy there is no information that this would be ignored for a credentials template, so one assumes that the proxy is saved into the credentials template. (which would be a wonderful solution for not setting the proxy globally but only for repos that are hosted on a specific git server)

But: The proxy setting is ignored and if you set it manually in the secret, it get's ignored too. Taking a look at the representative struct RepoCreds one can see that the proxy is missing there also.

So this leaves me to the question: could we add the proxy to the RepoCreds struct and save it accordingly? Or might we add a mark in the UI that it's not saved into the credentials template?

To Reproduce

  1. Go to your Argo CD https://cd.apps.argoproj.io/settings/repos?addRepo=true
  2. Add a repository, fill in:
  • Repository URL: https://github.com/mycompanyorg
  • Proxy: https://yourcorporateproxy.com:3128
  1. Save as credentials template
  2. Get the created secret on the cluster
  3. See that the proxy is not set there
  4. Try to set the proxy key in the secret using kubectl edit`
  5. See that when creating an application pointing to https://github.com/mycompanyorg/myapp it fails with a timeout because Argo CD doesn't connect via the proxy.

Expected behavior

The proxy field is set in the secret when creating a credentials template and Argo CD uses this to reach the repos in the specified location.

Version

Struct has no proxy on master.

argocd: v2.5.2+148d8da
  BuildDate: 2022-11-07T17:06:04Z
  GitCommit: 148d8da7a996f6c9f4d102fdd8e688c2ff3fd8c7
  GitTreeState: clean
  GoVersion: go1.18.7
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.4.7+81630e6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions