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

Graceful shutdown for controller's namespace deletion

Abierto
#2,522 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@csviri ya está trabajando en esto.

Desde el 29/8/2024.

  • #2528 de @csviri — fusionado
Lenguaje dominante
Java
Estrellas
944
Forks
242
Merge medio
1 d 4 h
PR fusionados (30 d)
43

Descripción

Is your feature request related to a problem? Please describe.

This situation is a typical problem in integration tests (but not just). If the controller manages resources with finalizers in its namespace and the namespace gets deleted, in this case, the namespace deletion can get stuck since the pods of the operator are deleted before it can adequately finalize the resource (thus remove the finalizers).

Describe the solution you'd like

The ideal situation would be, that it waits until all the custom resources in the same namespace are cleaned up. (It might be also be possible to have such an intelligent shutdown hook).

Alternative would be just a simple shutdown hook to add that waits some time before it stops the controller. This might be trivial to add, does not require coding, but would be good to do add an integration test.

Additional context
see also: https://github.com/operator-framework/java-operator-sdk/issues/1876 - The finalizers would be needed if the operator has namespace scoped roles and rolebindings.

Notes:

For leader election, we might actually halt() instead of exit, which bypasses the shutdown hooks.

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.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.