Argocd ApplicationSet, Git Generator error during fetching repo

2.3k views Asked by At

Tested a official test code in a Argo CD reference.

https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: cluster-addons
  namespace: argocd
spec:
  generators:
  - git:
      repoURL: https://github.com/argoproj/argo-cd.git
      revision: HEAD
      directories:
      - path: applicationset/examples/git-generator-directory/cluster-addons/*
  template:
    metadata:
      name: '{{path.basename}}'
    spec:
      project: "my-project"
      source:
        repoURL: https://github.com/argoproj/argo-cd.git
        targetRevision: HEAD
        path: '{{path}}'
      destination:
        server: https://kubernetes.default.svc
        namespace: '{{path.basename}}'
      syncPolicy:
        syncOptions:
        - CreateNamespace=true

And when I applied an ApplicationSet to my cluster and it deploy to local cluster. The error is like below.

Status:
  Conditions:
    Last Transition Time:  2022-12-23T00:53:42Z
    Message:               Error during fetching repo: `git fetch origin HEAD --tags --force --prune` failed exit status 128: fatal: unable to access 'https://github.com/argoproj/argo-cd.git/': getaddrinfo() thread failed to start
    Reason:                ApplicationGenerationFromParamsError
    Status:                True
    Type:                  ErrorOccurred
    Last Transition Time:  2022-12-23T00:53:42Z
    Message:               Error during fetching repo: `git fetch origin HEAD --tags --force --prune` failed exit status 128: fatal: unable to access 'https://github.com/argoproj/argo-cd.git/': getaddrinfo() thread failed to start
    Reason:                ErrorOccurred
    Status:                False
    Type:                  ParametersGenerated
    Last Transition Time:  2022-12-23T00:53:42Z
    Message:               Error during fetching repo: `git fetch origin HEAD --tags --force --prune` failed exit status 128: fatal: unable to access 'https://github.com/argoproj/argo-cd.git/': getaddrinfo() thread failed to start
    Reason:                ApplicationGenerationFromParamsError
    Status:                False
    Type:                  ResourcesUpToDate
Events:                    <none>

Is there any idea who know about it?

1

There are 1 answers

0
임진욱 On

It would be a bug and it can be solved with a downgrading ArgoCD version.

My version was v2.5.5 and it is a bug. ArgoCD v2.2.11 works well.

https://github.com/argoproj/argo-cd/issues/11818.