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

[BUG] namespaced kruise-controller panics #1764

Open
miklezzzz opened this issue Sep 27, 2024 · 1 comment · May be fixed by #1773
Open

[BUG] namespaced kruise-controller panics #1764

miklezzzz opened this issue Sep 27, 2024 · 1 comment · May be fixed by #1773
Assignees
Labels
kind/bug Something isn't working

Comments

@miklezzzz
Copy link

What happened:
If --namespace flag is set (e.g., --namespace=kruise-system), the controller of v1.7.x panics on startup with the following stacktrace:

I0927 15:42:21.569651       1 reflector.go:325] Listing and watching *v1.ControllerRevision from pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229
I0927 15:42:21.670294       1 shared_informer.go:341] caches populated
panic: interface conversion: *cache.multiNamespaceInformer is not cache.SharedIndexInformer: missing method GetController

goroutine 176 [running]:
github.com/openkruise/kruise/pkg/controller/daemonset.newReconciler({0x2c5d3c8, 0xc000129520})
	/workspace/pkg/controller/daemonset/daemonset_controller.go:175 +0x46a
github.com/openkruise/kruise/pkg/controller/daemonset.Add({0x2c5d3c8, 0xc000129520})
	/workspace/pkg/controller/daemonset/daemonset_controller.go:141 +0x13a
github.com/openkruise/kruise/pkg/controller.SetupWithManager({0x2c5d3c8, 0xc000129520})
	/workspace/pkg/controller/controllers.go:74 +0x82
main.main.func2()
	/workspace/main.go:252 +0x12d
created by main.main
	/workspace/main.go:244 +0x142a

What you expected to happen:

How to reproduce it (as minimally and precisely as possible): see above

Anything else we need to know?:

Environment:

  • Kruise version: v1.7.x
  • Kubernetes version (use kubectl version): 1.27
  • Install details (e.g. helm install args):
  • Others:
@miklezzzz miklezzzz added the kind/bug Something isn't working label Sep 27, 2024
@hantmac
Copy link
Member

hantmac commented Sep 28, 2024

@miklezzzz The code may switch to using multiNamespaceInformer instead of the standard SharedIndexInformer. multiNamespaceInformer implements the SharedInformer interface, but is not fully compatible with the SharedIndexInformer interface. We will fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants