Kubernetes / NRI communication path

Abierto
#282 19 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 6 días

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Comienza con el documento de diseño enlazado y el hook NodePrepareResources() existente; después, revisa los plugins NRI requeridos, las anotaciones y CDI tal como se describen en el issue. Rastrea cómo se comunican actualmente DRA y NRI a través de kubelet y el runtime de contenedores. Se considera terminado cuando un driver puede garantizar que el callback NRI previsto se invoque para un pod específico después de reinicios del runtime, sin requerir una configuración global de containerd.

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

Descripción

This was found by @gauravkghildiyal , see doc with more details.

in DRANET, a DRA driver for kubernetes networking, we implement an architecture with 2 legs for the driver:

  1. Kubelet via DRA
  2. Container runtime via NRI

This architecture allow to handle complex workloads that require to execute at different stages of a pod creation. Also, this guarantees that the kubernetes system will not schedule nothing to the node until the DRA driver in the node is running, the driver can store the state in memory during the kubelet DRA NodePrepareResources() callback, and use the NRI callback to execute the actions on the Pod during the container runtime stage.

However, there is still a race in this process, if for any case the runtime is restarted, the DRA driver will not be able to notice it and the Pod can be running without the NRI call back called ... we need to ensure that a specific driver is always called for a specific pod

NRI added the concept of required plugins https://github.com/containerd/nri/pull/278 , this indicates that drivers can implement this behavior globally modifying the configuration or via annotations.

Since global is an admin option that requires changing containerd config, is hard for independent drivers to modify it, so we need to use the annotations path, however, the DRA hook in kubelet does not have a way to plumb dumb annotations (Device plugin does have)

I commented this during kubecon with NRI maintainers @klihub @kad they mentioned it should be possible to use the existing NodePrepareResources() hook to be able to use CDI to allow this functionality, but may require some work in some places to enable it.

@klihub @gauravkghildiyal @samuelkarp @chrishenzie

Lenguaje dominante
Go
Estrellas
419
Forks
105
Merge medio
9 d 7 h
PR fusionados (30 d)
14

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 containerd/nri

Todos los issues de containerd/nri

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.