kubernetes: build with an initContainer or a Job
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- kubernetes, terraform
- Ambito
- cloud, infrastructure
Direzione di ricerca
Non vengono indicati file o test. Inizia esaminando il deployment Kubernetes corrente e le risorse Terraform, quindi traccia il modo in cui envbuilder esegue le build durante l’avvio del workspace; il lavoro sarà completo quando sarà stata scelta e implementata una proposta, sarà stato validato il passaggio del riferimento all’immagine e sarà stata affrontata la trasmissione dei log di build.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- Go
- Stelle
- 300
- Fork
- 64
- Merge medio
- 20m
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/envbuilder
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
coder/envbuilder#506 ·
-
bug envbuilder needs-investigation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
coder/envbuilder#495 ·
-
envbuilder Feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
coder/envbuilder#492 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
coder/envbuilder#484 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
coder/envbuilder#483 ·
Tutte le issue di coder/envbuilder
Issue simili
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
kubernetes-sigs/prow#953 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
caddyserver/caddy#8046 ·