-
Notifications
You must be signed in to change notification settings - Fork 905
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
Use a single cache for all dynamic controllers (i.e. XRs and claims) #5651
Commits on May 20, 2024
-
Move engine and GVK routed cache from c/cr
This just moved the files, unedited, as of the below commit. crossplane/crossplane-runtime@8641eb2 Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for e0bd283 - Browse repository at this point
Copy the full SHA e0bd283View commit details -
Rename the controller package to engine, rename types to not stutter
Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for 697dc71 - Browse repository at this point
Copy the full SHA 697dc71View commit details -
Use the c/c controller engine and GVK routed cache, not c/cr
Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for bb6cbc8 - Browse repository at this point
Copy the full SHA bb6cbc8View commit details -
Bump to latest runtime and kubernetes deps
This bumps crossplane-runtime, controller-runtime, and k8s.io dependencies to latest. Per the below PR, the latest crossplane-runtime doesn't have the controller engine anymore. It moved into c/c. crossplane/crossplane-runtime#689 Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for 89ce6c7 - Browse repository at this point
Copy the full SHA 89ce6c7View commit details -
Linter updates due to bumping go.mod to Go v1.22
Updating our controller-runtime and Kubernetes dependencies bumped our minimum Go version to v1.22. That in turn enables some new linters, since we no longer need to copy range vars in Go v1.22. Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for 05bd8bd - Browse repository at this point
Copy the full SHA 05bd8bdView commit details -
Workaround malformed generated CRD
Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for 355ba7a - Browse repository at this point
Copy the full SHA 355ba7aView commit details -
Make CompositeReconcilerOptions a method on Reconciler
It started as a function, but now we pass several arguments that are all fields of the Reconciler. It's only called once, by the Reconciler. Making it a method shortens the function signature, and makes it clear which things change on each reconcile and which are fixed. Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for 5cfbd67 - Browse repository at this point
Copy the full SHA 5cfbd67View commit details -
Re-enable realtime compositions E2E tests
Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for e68021d - Browse repository at this point
Copy the full SHA e68021dView commit details -
Move realtime composition event handlers into their own file
Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for b756bd1 - Browse repository at this point
Copy the full SHA b756bd1View commit details -
Use a single cache for all dynamic controllers
Crossplane uses a controller engine to dynamically start claim and XR controllers when a new XRD is installed. Before this commit, each controller gets at least one cache. This is because when I built this functionality, you couldn't stop a single informer within a cache (a cache is basically a map of informers by GVK). When realtime composition is enabled, there are even more caches. One per composed resource GVK. A GVK routed cache routes cache lookups to these various delegate caches. Meanwhile, controller-runtime recently made it possible to stop an informer within a cache. It's also been possible to remove an event handler from an informer for some time (since Kubernetes 1.26). kubernetes-sigs/controller-runtime#2285 kubernetes-sigs/controller-runtime#2046 This commit uses a single client, backed by a single cache, across all dynamic controllers (specifically the definition, offered, claim, and XR controllers). Compared to the current implementation, this commit: * Takes fewer global locks when realtime compositions are enabled. Locking is now mostly at the controller scope. * Works with the breaking changes to source.Source introduced in controller-runtime v0.18. :) I think this makes the realtime composition code a little easier to follow by consolodating it into the ControllerEngine, but that's pretty subjective. Signed-off-by: Nic Cope <nicc@rk0n.org>
Configuration menu - View commit details
-
Copy full SHA for 5ce3edd - Browse repository at this point
Copy the full SHA 5ce3eddView commit details