operator-framework / operator-framework/java-operator-sdk
Automatically Delete Resource if Dependent Removed From Workflow
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 944
- Forks
- 242
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 43
Beschreibung
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.
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 damit, die im Issue beschriebene Workflow-Ausführung sowie den Lebenszyklus des Informers und abhängiger Ressourcen zu überprüfen. Ermittle, wie Kinds verwalteter Ressourcen und Namen abhängiger Ressourcen beibehalten werden können, und definiere anschließend den Abschluss so, dass die Bereinigung vor der Ausführung für entfernte abhängige Ressourcen erfolgt, ohne mehrere Ressourcen desselben Typs zu verwechseln.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, kubernetes
- Bereich
- infrastructure
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100