operator-framework / operator-framework/java-operator-sdk

Automatically Delete Resource if Dependent Removed From Workflow

Aperta
#2,267 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature
Lingua principale
Java
Stelle
944
Fork
242
Merge medio
1g 4h
PR unite (30g)
43

Descrizione

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:

  1. 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.

  2. 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 getSecondaryResource on 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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando l'esecuzione del workflow e il ciclo di vita dell'informer e delle risorse dipendenti descritti nell'issue. Determina come mantenere i kind delle risorse gestite e i nomi delle risorse dipendenti, quindi definisci il completamento in modo che la pulizia avvenga prima dell'esecuzione per le risorse dipendenti rimosse, senza confondere più risorse dello stesso tipo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, kubernetes
Ambito
infrastructure
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.