applicationset
applicationset copied to clipboard
ApplicationSet xxx contains unrecognized generators: pullRequest
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 : check invalid ApplicationSet has been created , kubectl get ApplicationSet -A and look for bgd-pr-testing @ishitasequeira : should we mark it as invalid
@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
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:
I'll recheck, u can too if zero array for geenrators is accepted , it think a bug should be reported