-
Notifications
You must be signed in to change notification settings - Fork 1.2k
controller can't recover from missing CRD #2589
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
Comments
/kind support |
This timeout was delibaretely added, because before that, it would just silently not work. You can adjust this timeout to a very high value if that is what you want. |
that's not what I want. I want to find out a way for manager to recover quickly after CRD is applied instead of waiting for 2mins. |
I would expect that to work but its definitely something we do not test. Feel free to debug and file a fix. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I'm hitting this issue too now. In my case we have a manager that has multiple controllers. As such I'm seeing :
which is expected. What is not expected is that once the CRD gets installed (by the first controller), the manager keeps retrying without finding it, and it eventually fails starting with I also tried bumping the CacheSyncTimeout for the cache to be synced. But no matter how long the timeout is, the installed CRD is never detected. Would we be able to reopen this? Thanks! |
What controller-runtime version is this? The caches restmapper should reload the mapping |
@alvaroaleman sigs.k8s.io/controller-runtime v0.17.4 |
Hm works for me (with CR v0.18.4 in Cluster API). It might depend on some details of which apiGroups / CRs exist and what exactly is added later. Can you try to create a minimal controller + CRDs to reproduce? |
I'm running a controller with sigs.k8s.io/controller-runtime v0.15.1. I find that if CRDs are not applied when calling mgr.Start(), it won't recover by itself after applying the CRDs and continuously printing error:
To making things worse, /healthz passes that avoid a quick fix by liveness probe failure.
It doesn't happen when running with 0.13.
What's more strange is that I even run
Manager.GetRESTMapper().RESTMapping
in a loop before continue to run mgr.Start() but it doesn't help so the claimit should be installed before calling Start
seems fake.After about two mins, the controller restarts itself due to
timed out waiting for cache to be synced
and things start to work after that.note: we are using Options.NewCache to filter on those CRDs.
The text was updated successfully, but these errors were encountered: