kubernetes: build with an initContainer or a Job
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- kubernetes, terraform
- Área
- cloud, infrastructure
Línea de trabajo
No se nombran archivos ni pruebas. Empieza revisando el deployment actual de Kubernetes y los recursos de Terraform; después, sigue cómo envbuilder realiza las compilaciones durante el inicio del workspace. El trabajo estará terminado cuando se haya elegido e implementado una propuesta, se haya validado la transferencia de la referencia de imagen y se haya abordado el streaming de los logs de compilación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
Currently, envbuilder runs at the start up of a workspace, exposing elements of the buildtime to the runtime and vice-versa:
- Build secrets (e.g. dockerconfig)
- Environment variables (#91)
- Mounts (#187)
- Privileges (#181)
- Container layers are downloaded in each container rather than on the nodes
- ... (feel free to grow the list)
Proposal 1: initContainer
- Envbuilder would build the image as an initContainer and push it to a container registry
- The main container would pull and run the image (todo: validate that the pod can be created without the image existing yet)
This would require to generate/know the image reference ahead of time.
Proposal 2: Kubernetes Job
Entire decoupling of buildtime and runtime:
- Envbuilder runs as Kubernetes
Jobto build and push the container image - It writes a
ConfigMapwith the reference of the built image - Terraform waits for completion of the
Job - Terraform reads the
ConfigMapwithkubernetes_config_mapdatasource (explicitly depending on theJobcreation) - The image reference from the
ConfigMapis then used to create aDeployment - A short
ttl_seconds_after_finishedwould allow clean up of the Job for it to be recreated on the nextterraform apply
The ConfigMap could be used to share of information between envbuilder and Terraform (#121), like the volumes defined in the devcontainer.json (#220)
Detail to consider: I believe the Coder server starts streaming the logs from the deployment after the terraform apply has finished, it would need to be able to do it for the Job while the apply is running to expose the build logs to the user.
Is it something that has been thought of/done but not documented yet?
- Lenguaje dominante
- Go
- Estrellas
- 300
- Forks
- 64
- Merge medio
- 20 min
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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.
Más de coder/envbuilder
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
coder/envbuilder#506 ·
-
bug envbuilder needs-investigation
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
coder/envbuilder#495 ·
-
envbuilder Feature
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
coder/envbuilder#492 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
coder/envbuilder#484 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
coder/envbuilder#483 ·
Todos los issues de coder/envbuilder
Issues similares
-
nix: vendorHash is outdated Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Bob Shell support Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
santhosh-tekuri/jsonschema#276 ·