Automatically Delete Resource if Dependent Removed From Workflow

Abierto
#2,267 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
java, kubernetes

Línea de trabajo

Comienza revisando la ejecución del workflow y el ciclo de vida del informer y de los recursos dependientes descritos en el issue. Determina cómo se pueden conservar los kinds de los recursos gestionados y los nombres de los recursos dependientes y, después, define la finalización de modo que la limpieza se produzca antes de la ejecución para los recursos dependientes eliminados, sin confundir varios recursos del mismo tipo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

feature

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.

Lenguaje dominante
Java
Estrellas
944
Forks
242
Merge medio
1 d 4 h
PR fusionados (30 d)
43

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de operator-framework/java-operator-sdk

Todos los issues de operator-framework/java-operator-sdk

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.