Commit Graph

25 Commits

Author SHA1 Message Date
ezgidemirel 249f4c09be
remove XRStateMetrics
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2024-04-18 15:44:32 +03:00
ezgidemirel aa7264baf4
make state recorders Runnable and remove unstructured listing
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2024-04-16 20:01:05 +03:00
ezgidemirel 4b6c2de666
add XR state metrics
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2024-04-16 11:36:10 +03:00
ezgidemirel af6588856c
change init pattern and move state metrics to a go routine
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2024-04-08 18:48:05 +03:00
Nic Cope 0c7b1eb549 Bump golangci-lint, copy config from c/c
This copies the latest config from c/c and addresses all the linter
errors that config produces.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2024-02-20 03:45:27 -08:00
Philippe Scorsolini 88865715a0
fix: add RemoveInformer to implement Informers
Co-authored-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
2024-01-31 15:05:57 +00:00
Dr. Stefan Schimanski 7f21c79d63
controller/engine: sync informers on controller start
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
2024-01-09 23:13:56 +01:00
Dr. Stefan Schimanski 8c70e452b0
Revert back to interface
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
2023-10-13 12:10:45 +02:00
Dr. Stefan Schimanski d77466ecd2
controller/engine: split controller creation and start
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
2023-10-13 11:48:06 +02:00
Dr. Stefan Schimanski 33981937cc
controller/engine: merge parent and local cache
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
2023-10-13 11:48:06 +02:00
Dr. Stefan Schimanski eb74932955
controller: add TriggeredBy custom watches to engine
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@upbound.io>
2023-09-18 14:03:41 +03:00
Christopher Haar e147d407d7 feat(controller-runtime): add recover true option
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
2023-08-01 10:46:32 +02:00
Mateusz Puczyński 920e5b1ac6
bump sigs.k8s.io/controller-runtime to v0.15.0
Signed-off-by: Mateusz Puczyński <mati6095@gmail.com>
2023-05-26 17:29:45 +02:00
ezgidemirel 00a8da972a
Add secret name to ESSOptions
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2023-03-22 18:01:48 +03:00
ezgidemirel b0785ed1ca
change store type, make tls config an option
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2023-03-22 13:00:06 +03:00
ezgidemirel fc63b94eb5
Remove certificate loading to make it on upper layers, add unit tests
Signed-off-by: ezgidemirel <ezgidemirel91@gmail.com>
2023-03-22 13:00:06 +03:00
Nic Cope f7ed086985 Don't rate limit requests that are already delayed by rate limiting
Signed-off-by: Nic Cope <negz@rk0n.org>
2021-09-25 02:41:39 +00:00
Nic Cope 277dabb3df Support true global reconcile rate limiting
This PR tweaks how ratelimiters are applied to support _actual_ global reconcile
rate limiting - that is all reconcile triggers are rate limited, not just some.

See https://github.com/crossplane/crossplane/issues/2595 for details.

Signed-off-by: Nic Cope <negz@rk0n.org>
2021-09-24 21:29:00 +00:00
Nic Cope f2b0ca3026 Add DefaultOptions
I don't really expect these to be used in practice. They're mostly useful for
places like the XRD controllers where we need a default set of options to plumb
down to the XR and XRC controllers when none are passed to use (i.e. in tests).

Signed-off-by: Nic Cope <negz@rk0n.org>
2021-09-21 03:47:25 +00:00
Nic Cope efa7256648 Add a convenience function for deriving controller-runtime options
Signed-off-by: Nic Cope <negz@rk0n.org>
2021-09-21 03:12:43 +00:00
Nic Cope b7335472cd Add a controller.Options type
This type is intended to be passed as the argument to most Crossplane Setup
functions, for example:

```go
func Setup(mgr ctrl.Manager, o controller.Options) error
```

This allows us to add new options to be plumbed down to all or most controllers
without increasing the number of arguments provided to each Setup function. Sets
of controllers that require additional arguments (e.g. the pkg controllers from
crossplane/crossplane) can define their own Options struct that embeds this one.

Signed-off-by: Nic Cope <negz@rk0n.org>
2021-09-21 03:12:43 +00:00
Nic Cope af4e148a11 Replace github.com/pkg/errors with our own pkg/errors.
Signed-off-by: Nic Cope <negz@rk0n.org>
2021-09-09 07:50:57 +00:00
Sascha Grunert 423918f457
Update controller runtime to v0.8.0
This updates the controller-runtime and all of its dependencies to the
latest release.

This includes a bunch of changes which break backwards compatibility
introduced by controller-runtime 0.7.0 and 0.8.0, for example:

> A number of methods that previously took runtime.Object & internally
> type-asserted them to metav1.Object now take client.Object (for non-list
> objects) or client.ObjectList (for lists). The practical upshot of this
> is more type-safety and clarity around what's required for particular
> methods.
> All concrete API types (anything that implements runtime.Object & has
> a metadata field) already implement client.Object or client.ObjectList,
> so practical impact should be limited to folks who pass around
> runtime.Object values instead of concrete types.

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-01-21 13:29:16 +01:00
Nic Cope 357942c02d Add a "controller engine" that manages the lifecycles of controllers
A controller engine is somewhat like a controller "sub-manager", in that it's
effectively a group of controllers. Unlike a typical controller manager, the
lifecycle of the controllers an engine manages are not coupled to the lifecycle
of the engine itself. An engine may be used by a parent controller to start and
stop child controllers in accordance with configuration provided by the custom
resource that the parent controller watches.

Signed-off-by: Nic Cope <negz@rk0n.org>
2020-04-23 01:51:27 -07:00
Nic Cope 8fe8833cc3 Pin controller-runtime to master
https://github.com/kubernetes-sigs/controller-runtime/pull/863

We'd like to use the above PR, which is not yet included in a controller-runtime
release. Updating controller-runtime requires updating a few other dependencies,
which changed the signature of client-go clientset methods. This commit removes
the only two uses of clientset from crossplane-runtime. pkg/test/integration now
uses a controller-runtime client.Client. pkg/test.Env has been removed, as it no
longer has any known users.

Signed-off-by: Nic Cope <negz@rk0n.org>
2020-04-22 19:14:42 -07:00