operator-framework / operator-framework/java-operator-sdk
Multi Cluster Support
Ein zugehöriger Pull Request wurde bereits gemerged.
- #2499 von @csviri — gemerged
- Vorherrschende Sprache
- Java
- Sterne
- 944
- Forks
- 242
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 43
Beschreibung
As discussed in #1307 it would be nice to have cluster a context setting for each controller.
Why?
Currently a operator can only a act on a single context. Traditionally that's fine as an operator often orchestrates only resources in the very cluster its deployed it self. In this scenario the operator gets its identity natively from the kubernetes context and is statically configured for its own cluster.
In contrast to that we have a use case where we manage multiple clusters with on operator which is deployed to a meta/central cluster. The operator still manages resources within this meta cluster but to instantiate the desired application it will also manage child/runtime clusters.
Example:
The control cluster manages a CRD which has been instantiated twice. The operator picks them up and deploys resources to fulfil the desired resource. To do that the operator has to deploy the application into multiple clusters which are e.g. physically separated and therefore can't have a single identity or are separated due to availability needs or to test new versions of kuberentes etc. Therefore a full replication of the resources is created in each cluster and the operator watches all of them.
Control Cluster
┌──────────────────────────────┐ Cluster A
│ │ ┌──────────────────────────────────────────┐
│ Namespace-crds │ │ Namespace-A Namespace-B │
│ ┌──────────────┐ ┌───┼─┤►┌─────────────┐ ┌─────────────┐ │
│ │ │ │ │ │ │ │ │ │ │
│ │ CRD-A │ │ │ │ │ Deployment │ │ Deployment │ │
│ │ CRD-B │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ └─────────────┘ └─────────────┘ │
│ └─────▲────────┘ │ │ │ │
│ │ │ │ └──────────────────────────────────────────┘
│ │ Reconcile │ │
│ │ │ │ Cluster B
│ ┌────┴────────┬──────┘ │ ┌──────────────────────────────────────────┐
│ │ │ │ │ Namespace-A Namespace-B │
│ │ Operator ├──────────┼──┤►┌─────────────┐ ┌─────────────┐ │
│ │ │ Create/ │ │ │ │ │ │ │
│ └─────────────┘ Reconcile │ │ Deployment │ │ Deployment │ │
│ │ │ │ │ │ │ │
│ │ │ └─────────────┘ └─────────────┘ │
│ │ │ │
└──────────────────────────────┘ └──────────────────────────────────────────┘
Goals:
- add a context setting for the controller annotation so context can be in addition to the namespace for each reconciler individually
- add startup probe to ensure all desired context are available
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Durchsicht von Issue #1307 und des verknüpften PR #2499, um den bisherigen Ansatz zu verstehen. Es werden keine Dateien oder Tests genannt; abgeschlossen bedeutet, Annotationen für den Kontext pro Controller zu unterstützen und einen Start-up-Probe hinzuzufügen, der überprüft, ob alle gewünschten Kontexte verfügbar sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, kubernetes
- Bereich
- devops, infrastructure
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100