operator-framework / operator-framework/java-operator-sdk
[Feature Request/Question] Controller watch namespaces based on labels (and event sources)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 944
- Forks
- 242
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 43
Descripción
Description
Based on the documentation, the controller is able to dynamically adjust the watched namespaces based on explicit namespace names (often provided through a config map or similar). A convenient extension to this would be able to watch namespaces based on the labels/annotations for a given namespace. I would be helpful if this was built into the machinery of the controller itself, so it could be controlled by some high level configuration
Motivation
Sometimes the creation of new namespaces that need to interact (be watched by) with the operator are done through workflows outside of the purview of the "operator admin". Currently, in order to ensure coverage of all namespaces, either (1) both workflows need to interact and inform the operator deployment when namespaces are added, or (2) the operator simply needs to watch all namespaces. This is where a third option, of only coordinating the appropriate labels would be beneficial
(Somewhat) Related Projects
https://github.com/kubernetes-sigs/hierarchical-namespaces/blob/master/docs/user-guide/concepts.md
Workarounds considered
Use the Kubernetes client itself to query for namespaces upon controller start, periodically poll for changes. Similarly, try to use some form of an Informer to get the same information
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza localizando la configuración explícita de namespaces existente del controller y el manejo de event-sources, y después revisa los enfoques de cliente de Kubernetes e informer mencionados en el issue. Aclara la selección de labels y annotations, la configuración de alto nivel y el comportamiento cuando se crean namespaces coincidentes; se considera terminado cuando el controller observa los namespaces seleccionados sin requerir coordinación de workflows ni observar todos los namespaces.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, kubernetes
- Área
- infrastructure
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100