operator-framework / operator-framework/java-operator-sdk
Automatically Delete Resource if Dependent Removed From Workflow
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 944
- フォーク
- 242
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 43
説明
If a dependent is removed from a workflow, the previously created resource represented by that dependent needs to be cleaned up. This can happen before the actual workflow is executed.
This could be done automatically before a workflow is executed, although it is not trivial in general. There are two problems:
-
If a dependent is removed, on startup the informer related to its type might not be added anymore. So we would need to mark somewhere (maybe status or annotation?) the GVk-s of resources managed.
-
If there are multiple resources of the same type in general it is not easy to identify which resource belongs to which dependent resource - without calling
getSecondaryResourceon the dependent. Since this cleanup would happen before the dependents are reconciled this is not doable without imposing additional requirements on implementation: for example, if the id of the resource is calculated based on the desired state, the desired state calculation might depend on other resources (which might not be reconciled now).
Fortunately, this problem can be solved simply just by adding the name of the dependent as an annotation to the resource so it can be identified easily.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に記載されている workflow の実行と、informer および依存リソースのライフサイクルを確認します。管理対象リソースの kind と依存リソースの名前を保持する方法を判断し、そのうえで、同じ種類の複数のリソースを混同せずに、削除された依存リソースについて実行前にクリーンアップが行われることを完了と定義します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, kubernetes
- 領域
- infrastructure
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100