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

appset: Error informer is not a kubernetes informer when controller generate applications #18905

Closed
3 tasks done
dacofr opened this issue Jul 2, 2024 · 7 comments · Fixed by #19618
Closed
3 tasks done
Labels
bug Something isn't working component:application-sets Bulk application management related regression Bug is a regression, should be handled with high priority type:bug

Comments

@dacofr
Copy link
Contributor

dacofr commented Jul 2, 2024

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

I think that a regression as been introduced since 2.11.3. Now, when I run locally the appset controller, each time an application is created/updated I got this message : informer is not a kubernetes informer coming from updateCache

func (r *ApplicationSetReconciler) updateCache(ctx context.Context, obj client.Object, logger *log.Entry) {
	informer, err := r.Cache.GetInformer(ctx, obj)
	if err != nil {
		logger.Errorf("failed to get informer: %v", err)
		return
	}
	// The controller runtime abstract away informers creation
	// so unfortunately could not find any other way to access informer store.
	k8sInformer, ok := informer.(k8scache.SharedInformer)
	if !ok {
		logger.Error("informer is not a kubernetes informer")
		return
	}
	if err := k8sInformer.GetStore().Update(obj); err != nil {
		logger.Errorf("failed to update cache: %v", err)
		return
	}
}

I haven't knowledge with controller-runtime, but when I run locally on master branch vs commit in 2.11.2, I see that something change in cache implementation : multiNamespaceCache vs informerCache. Maybe a clue #17491 .

To Reproduce

If you continue by updating appset spec, each time an application is created or updated, we have an error.

Expected behavior

No error log !

Version

Running locally based on this commit : b96be4c

Logs

INFO[0029] generated 3 applications                      applicationset=argocd/hello-appset generator="{&ListGenerator{Elements:[]JSON{{[123 34 110 97 109 101 115 112 97 99 101 34 58 34 100 101 118 34 125]},{[123 34 110 97 109 101 115 112 97 99 101 34 58 34 115 116 103 34 125]},{[123 34 110 97 109 101 115 112 97 99 101 34 58 34 112 114 100 34 125]},},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},ElementsYaml:,} nil nil nil nil nil nil nil nil nil}"
ERRO[0029] informer is not a kubernetes informer         app=argocd/dev applicationset=argocd/hello-appset
INFO[0029] created Application                           app=argocd/dev applicationset=argocd/hello-appset
ERRO[0029] informer is not a kubernetes informer         app=argocd/stg applicationset=argocd/hello-appset
INFO[0029] created Application                           app=argocd/stg applicationset=argocd/hello-appset
ERRO[0029] informer is not a kubernetes informer         app=argocd/prd applicationset=argocd/hello-appset
INFO[0029] created Application                           app=argocd/prd applicationset=argocd/hello-appset
INFO[0029] end reconcile                                 applicationset=argocd/hello-appset requeueAfter=0s
INFO[0029] generated 3 applications                      applicationset=argocd/hello-appset generator="{&ListGenerator{Elements:[]JSON{{[123 34 110 97 109 
@uthark
Copy link

uthark commented Aug 5, 2024

I'm observing this error after upgrading to 2.12.0 from 2.11.7.

@crenshaw-dev crenshaw-dev added the regression Bug is a regression, should be handled with high priority label Aug 5, 2024
@tbronchain
Copy link

tbronchain commented Aug 6, 2024

I can confirm the issue happens on 2.12.0, but resolved after downgrading to 2.11.7, on multiple argo deployments/clusters/apps.

@Supporterino
Copy link

Same here 2.12.0 introduces the error and reverting to 2.11.7 removes the error message and the thus related high load of the container

@bhvishal9
Copy link

Observing the same issue as soon as I upgraded to 2.12.0.

@Alwinius
Copy link

Same for us, but we cannot downgrade because 2.12.0 fixes some major issues we had in Kubernetes 1.30

@crenshaw-dev
Copy link
Member

Thanks for the confirmations, all! If you're affected, please thumbs-up the issue. If you have additional details about the issue, please comment.

@nobbs
Copy link

nobbs commented Aug 19, 2024

Still happening in v2.12.1.

crenshaw-dev added a commit to crenshaw-dev/argo-cd that referenced this issue Aug 21, 2024
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
crenshaw-dev added a commit that referenced this issue Aug 22, 2024
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Aug 22, 2024
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
crenshaw-dev added a commit that referenced this issue Aug 22, 2024
…19636)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:application-sets Bulk application management related regression Bug is a regression, should be handled with high priority type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants