kubernetes: build with an initContainer or a Job
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- kubernetes, terraform
- Domaine
- cloud, infrastructure
Piste de recherche
Aucun fichier ni test n’est nommé. Commencez par examiner le déploiement Kubernetes actuel et les ressources Terraform, puis suivez la manière dont envbuilder effectue les builds au démarrage du workspace ; le travail sera terminé lorsqu’une proposition aura été choisie et implémentée, que le transfert de la référence d’image aura été validé et que le streaming des logs de build aura été pris en charge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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?
- Langage dominant
- Go
- Étoiles
- 300
- Forks
- 64
- Merge moyen
- 20 min
- PR mergées (30 j)
- 1
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de coder/envbuilder
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
coder/envbuilder#506 ·
-
bug envbuilder needs-investigation
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
coder/envbuilder#495 ·
-
envbuilder Feature
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
coder/envbuilder#492 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
coder/envbuilder#484 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
coder/envbuilder#483 ·
Toutes les issues de coder/envbuilder
Issues similaires
-
agentic-workflows
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
agentic-workflows
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
microsoft/agent-framework-go#1179 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
infiniflow/ragflow#20223 · 1 réaction ·
-
bug needs triage pkg/translator/faro
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · 1 commentaire ·