Commit Graph

21 Commits

Author SHA1 Message Date
Alexander Zielenski
063ef090e7
switch listeners to use a map, adapt tests 2022-08-08 14:01:10 -07:00
Uwe Krueger
92f04baac9
apply desired changes for handler registration 2022-08-08 14:01:09 -07:00
Uwe Krueger
7054ac16d4
rename handle to registration 2022-08-08 14:01:09 -07:00
Alexander Zielenski
7436af3302
support removal of event handlers from SharedIndexInformers
To be able to implement controllers that are dynamically deciding
on which resources to watch, it is required to get rid of
dedicated watches and event handlers again. This requires the
possibility to remove event handlers from SharedIndexInformers again.
Stopping an informer is not sufficient, because there might
be multiple controllers in a controller manager that independently
decide which resources to watch.

Unfortunately the ResourceEventHandler interface encourages to use
value objects for handlers (like the ResourceEventHandlerFuncs
struct, that uses value receivers to implement the interface).
Go does not support comparison of function pointers and therefore
the comparison of such structs is not possible, also. To be able
to remove all kinds of handlers and to solve the problem of
multi-registrations of handlers a registration handle is introduced.
It is returned when adding a handler and can later be used to remove
the registration again. This handle directly stores the created
listener to simplify the deletion.
2022-08-08 14:01:09 -07:00
Mike Dame
80c01707e0
Wire contexts to Batch controllers (#105491)
* Wire contexts to Batch controllers

* (hold) feedback + updates that overlap with Apps controllers

* fixup errors
2021-11-10 14:56:46 -08:00
Maciej Szulik
1fb6bf8a14
Wire context instead of TODO 2021-10-12 13:21:45 +02:00
Aldo Culquicondor
d8aad7944c Remove unused util CreatePods
And rename CreatePodsWithControllerRef to simply CreatePods
2021-05-20 20:27:21 +00:00
Aldo Culquicondor
6fc5fc0c86 Remove unused CreatePodsOnNode function
Remnant of old daemonset controller
2021-04-15 18:53:36 +00:00
Joe Betz
29423501f0 Add apply subresource support to client-go's typed client 2021-04-05 12:27:42 -07:00
Joe Betz
293e07a836 Add Apply functions to client-gen 2021-03-06 20:49:06 -05:00
Mike Danese
bfc75d9a5c manual fixes 2020-02-08 12:32:33 -05:00
Mike Danese
2637772298 some manual fixes 2020-02-07 18:17:40 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Jordan Liggitt
fd9e9b01b1 Remove uses of extensions/v1beta1 clients 2018-12-19 11:18:53 -05:00
Jordan Liggitt
dda0a68521 Change registration and custom conversion from extensions to apps 2018-10-25 21:12:57 -04:00
Clayton Coleman
ba95744bc5
Make conversion function names match expected values 2018-07-17 23:02:16 -04:00
Anthony Yeh
f3799fae36
ReplicationController: Use apps/v1 ReplicaSet in conversion layer. 2018-03-19 13:32:08 -07:00
supereagle
9c02d7e38c use extensions client with explicit version 2017-11-22 21:18:14 +08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Anthony Yeh
97cef269bf
RC/RS dedup: Add protection against future RS versions. 2017-11-07 14:55:47 -08:00
Anthony Yeh
2c7ef5ad4f
Deduplicate RC/RS controller code.
The code was already 99% similar between RC and RS.
This is a wild idea to try to deduplicate the two controllers
in a type-safe manner without adding tons of boilerplate,
and without using code generation.

They are still separate resources. This is a refactor that isn't
intended to change any behavior.
2017-11-07 14:48:32 -08:00