operator-framework / operator-framework/java-operator-sdk
Multi Cluster Support
関連するプルリクエストがすでにマージされています。
- #2499 @csviri による — マージ済み
- 主要言語
- Java
- スター
- 944
- フォーク
- 242
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 43
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず issue #1307 とリンクされている PR #2499 を確認して、これまでのアプローチを理解してください。ファイルやテストは指定されていません。完了条件は、コントローラーごとのコンテキスト注釈をサポートし、必要なすべてのコンテキストが利用可能であることを検証する起動プローブを追加することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, kubernetes
- 領域
- devops, infrastructure
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100