Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

ApplicationSet xxx contains unrecognized generators: pullRequest #573

Open
jizusun opened this issue Apr 9, 2022 · 4 comments
Open

ApplicationSet xxx contains unrecognized generators: pullRequest #573

jizusun opened this issue Apr 9, 2022 · 4 comments

Comments

@jizusun
Copy link

jizusun commented Apr 9, 2022

Hi Community,

I'm getting this error message

➜  argocd-bgd git:(patch-1) stern applicationset --tail 7
+ argocd-applicationset-controller-665c58494c-q67ps › argocd-applicationset-controller
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:01:08Z" level=info msg="processing event for cluster secret" name=argocd-default-cluster-config namespace=project-hub-research-protal-bp type=createSecretEventHandler
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:01:08Z" level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:01:08Z" level=warning msg="ApplicationSet bgd-pr-testing contains unrecognized generators: pullRequest"
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:01:08Z" level=info msg="generated 0 applications" generator="{<nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil>}"
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:01:08Z" level=debug msg="apps from generator: []" generator="{<nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil>}"
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:01:08Z" level=info msg="end reconcile" requeueAfter=0s
argocd-applicationset-controller-665c58494c-q67ps argocd-applicationset-controller time="2022-04-09T06:11:07Z" level=info msg="Alloc=8746 TotalAlloc=30677 Sys=32466 NumGC=12 Goroutines=79"

And I installed my ArgoCD with ArgoCD Operator, and both ArgoCD and ApplicationSetController are the the latest version

apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
  name: argocd
spec:
  version: v2.3.3
  usersAnonymousEnabled: true
  statusBadgeEnabled: true
  applicationSet: 
    version: v0.4.1
    logLevel: debug
  server:
    insecure: true
    autoscale:
      enabled: false
    grpc:
      ingress:
        enabled: false
    ingress:
      enabled: false
    resources:
      limits:
        cpu: 50m
        memory: 256Mi
      requests:
        cpu: 10m
        memory: 128Mi
    route:
      enabled: true
      tls:
        termination: edge
        insecureEdgeTerminationPolicy: Redirect
    service:
      type: ''
  grafana:
    enabled: false
    ingress:
      enabled: false
    route:
      enabled: false
  prometheus:
    enabled: false
    ingress:
      enabled: false
    route:
      enabled: false
  initialSSHKnownHosts: {}
  rbac: {}
  repo:
    execTimeout: 360
    resources:
      limits:
        cpu: 50m
        memory: 256Mi
      requests:
        cpu: 10m
        memory: 128Mi
  dex:
    resources:
      limits:
        cpu: 50m
        memory: 256Mi
      requests:
        cpu: 10m
        memory: 128Mi
  ha:
    enabled: false
    resources:
      limits:
        cpu: 50m
        memory: 256Mi
      requests:
        cpu: 10m
        memory: 128Mi
  tls:
    ca: {}
  redis:
    resources:
      limits:
        cpu: 50m
        memory: 256Mi
      requests:
        cpu: 10m
        memory: 128Mi
  controller:
    processors: {}
    resources:
      limits:
        cpu: 100m
        memory: 512Mi 
      requests:
        cpu: 50m
        memory: 256Mi
    sharding: {}

What can I do fix the problem?

Best regards,
Jizu

@jizusun jizusun changed the title ApplicationSet bgd-pr-testing contains unrecognized generators: pullRequest ApplicationSet xxx contains unrecognized generators: pullRequest Apr 9, 2022
@rishabh625
Copy link
Contributor

rishabh625 commented Apr 12, 2022

@jizusun : check invalid ApplicationSet has been created , kubectl get ApplicationSet -A and look for bgd-pr-testing
@ishitasequeira : should we mark it as invalid

@jizusun
Copy link
Author

jizusun commented Apr 16, 2022

@rishabh625 Yes it's created

➜  software-factory-gitops git:(main) ✗ kubectl get ApplicationSet bgd-pr-testing -oyaml
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"argoproj.io/v1alpha1","kind":"ApplicationSet","metadata":{"annotations":{},"name":"bgd-pr-testing","namespace":"project-hub-research-protal-bp"},"spec":{"generators":[{"pullRequest":{"github":{"labels":["preview"],"owner":"jizusun","repo":"bgd"},"requeueAfterSeconds":300}}],"template":{"metadata":{"name":"bgd-{{branch}}-{{number}}"},"spec":{"destination":{"server":"https://kubernetes.default.svc"},"project":"default","source":{"path":"app/overlays/default/","repoURL":"https://github.com/jizusun/bgd","targetRevision":"{{head_sha}}"},"syncPolicy":{"automated":{"prune":true,"selfHeal":true}}}}}}
  creationTimestamp: "2022-04-11T10:00:14Z"
  generation: 1
  name: bgd-pr-testing
  namespace: project-hub-research-protal-bp
  resourceVersion: "226910298"
  uid: 4b7e1d52-8a2e-4a78-8602-3af536887f95
spec:
  generators:
  - {}
  template:
    metadata:
      name: bgd-{{branch}}-{{number}}
    spec:
      destination:
        server: https://kubernetes.default.svc
      project: default
      source:
        path: app/overlays/default/
        repoURL: https://github.com/jizusun/bgd
        targetRevision: '{{head_sha}}'
      syncPolicy:
        automated:
          prune: true
          selfHeal: true

@rishabh625
Copy link
Contributor

https://argocd-applicationset.readthedocs.io/en/stable/Generators-Pull-Request/#template

Look at above example , your generators array is empty

Add this in your application set it will get fixed

generators:
  - pullRequest:

@rishabh625
Copy link
Contributor

I'll recheck, u can too if zero array for geenrators is accepted , it think a bug should be reported

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants