operator-framework / operator-framework/java-operator-sdk
Corner Case: Clenup Processing for Delete Event Without Finalizer
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 944
- フォーク
- 242
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 43
説明
If Cleaner interface is implemented by a reconciler a finalizer is automatically added to the custom resource, and cleaner is called before it gets removed.
There is however a corner case when it makes sense to do cleanup event finalizer is not used. In case there is an in memory data held for a custom resource, so when a custom resource deleted, related indexed or in memory objects needs to be cleaned up. In this case a finalizer is not needed, since if the operator is down and the delete event is missed it's not a problem, since the cleanup is just for in memory data.
To support this we could add a feature flag to @ControllerConfiguration to don't add finalizer for cleanup: addFinalizerForCleaner.
Note that this is not a priority issue, we should probably implement it only if some requests it. Also having a finalizer in those cases would not be a big issues.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
@ControllerConfiguration アノテーションから始め、custom resource の削除時に Cleaner 実装が finalizer の処理をどのようにトリガーするかを追跡します。delete event がどこで処理され、cleanup がどのように呼び出されるかを確認します。提案された設定によって、cleanup の動作を変更せずに Cleaner が finalizer を追加するかどうかを制御でき、関連する動作がテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, kubernetes
- 領域
- infrastructure
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100