Skip to content

Commit 41bc0ee

Browse files
committed
Add CRD controllers alternative
1 parent 6a6ffe4 commit 41bc0ee

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

designs/conditional-controllers.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ enable the restarting of controllers
6161

6262
The second goal of a solution for running controllers conditionally is addressed
6363
by creating a wrapper around a controller called a ConditionalController that
64-
within its Start() function, it polls the discovery doc for the existence of the
65-
watched object and starts/stops/restarts the underlying controller as necessary
64+
within its Start() function, polls the discovery doc for the existence of the
65+
watched object and starts/stops/restarts the underlying controller as necessary.
6666

6767
The third goal of an ergonomic mechanism to use ConditionalControllers is a
6868
small modification to the controller builder to enable running a controller as a
@@ -116,6 +116,11 @@ mitigation is to clear out the slices upon ConditionalController shutdown.
116116

117117
#### Alternatives
118118

119+
* A metacontroller or CRD controller could start and stop controllers based on
120+
the existence of their corresponding CRDs. This requires no changes to made to
121+
controller-runtime. It does put the complexity of designing such a controller
122+
onto the end user, but there are potentially ways to provide end users with
123+
default, pluggable CRD controllers.
119124
* Instead of exposing ResetStart and SaveWatches on the internal controller struct
120125
it might be better to expose it on the controller interface. This is more public
121126
and creates more potential for abuse, but it prevents some hacky solutions

0 commit comments

Comments
 (0)