You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: designs/multi-cluster.md
+30-26
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Author: @sttts @embik
4
4
5
5
Initial implementation: @vincepri
6
6
7
-
Last Updated on: 12/04/2024
7
+
Last Updated on: 2025-01-06
8
8
9
9
## Table of Contents
10
10
@@ -38,7 +38,7 @@ objects. This proposal is about adding native support for multi-cluster use-case
38
38
to controller-runtime.
39
39
40
40
With this change, it will be possible to implement pluggable cluster providers
41
-
that automatically start and stop watches (and thus, cluster-aware reconcilers) when
41
+
that automatically start and stop sources (and thus, cluster-aware reconcilers) when
42
42
the cluster provider adds ("engages") or removes ("disengages") a cluster.
43
43
44
44
## Motivation
@@ -56,24 +56,27 @@ This change is important because:
56
56
57
57
### Goals
58
58
59
-
-Provide an interface for plugging in a "cluster provider", which provides a dynamic set of clusters that should be reconciled by registered controllers.
60
-
-Provide a way to natively write controllers that
61
-
1. (UNIFORM MULTI-CLUSTER CONTROLLER) operate on multiple clusters in a uniform way,
59
+
-Allow 3rd-parties to implement an (optional) multi-cluster provider Go interface that controller-runtime will use (if configured on the manager) to dynamically attach and detach registered controllers to clusters that come and go.
60
+
-With that, provide a way to natively write controllers for these patterns:
61
+
1. (UNIFORM MULTI-CLUSTER CONTROLLERS) operate on multiple clusters in a uniform way,
62
62
i.e. reconciling the same resources on multiple clusters, **optionally**
63
63
- sourcing information from one central hub cluster
64
64
- sourcing information cross-cluster.
65
65
66
-
Example: distributed `ReplicaSet` controller, reconciling `ReplicaSets` on multiple clusters.
67
-
2. (AGGREGATING MULTI-CLUSTER CONTROLLER) operate on one central hub cluster aggregating information from multiple clusters.
66
+
Example: distributed `ReplicaSet` controller, reconciling `ReplicaSets` on multiple clusters.
67
+
2. (AGGREGATING MULTI-CLUSTER CONTROLLERS) operate on one central hub cluster aggregating information from multiple clusters.
68
68
69
69
Example: distributed `Deployment` controller, aggregating `ReplicaSets` across multiple clusters back into a central `Deployment` object.
70
-
- Allow clusters to dynamically join and leave the set of clusters a controller operates on.
71
-
- Allow logical clusters where a set of clusters is actually backed by one physical informer store.
72
-
- Allow 3rd-parties to plug in their multi-cluster adapter (in source code) into
73
-
an existing multi-cluster-compatible code-base.
70
+
71
+
#### Low-Level Requirements
72
+
73
+
- Allow event sources to be cross-cluster such that:
74
+
1. Multi-cluster events can trigger reconciliation in the one central hub cluster.
75
+
2. Central hub cluster events can trigger reconciliation on multiple clusters.
76
+
- Allow reconcilers to look up objects through (informer) indexes from specific other clusters.
74
77
- Minimize the amount of changes to make a controller-runtime controller
75
78
multi-cluster-compatible, in a way that 3rd-party projects have no reason to
76
-
object these kind of changes.
79
+
object to these kind of changes.
77
80
78
81
Here we call a controller to be multi-cluster-compatible if the reconcilers get
79
82
reconcile requests in cluster `X` and do all reconciliation in cluster `X`. This
@@ -231,9 +234,16 @@ if err != nil {
231
234
client:= cl.GetClient()
232
235
```
233
236
234
-
Due to the BYO `request` type, controllers need to be built like this:
237
+
Due to the BYO `request` type, controllers using the `For` builder function need to be built/changed like this:
0 commit comments