kubernetes: build with an initContainer or a Job
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- kubernetes, terraform
- Bereich
- cloud, infrastructure
Rechercherichtung
Es werden keine Dateien oder Tests genannt. Beginne mit der Überprüfung des aktuellen Kubernetes-Deployments und der Terraform-Ressourcen und verfolge anschließend, wie envbuilder beim Start des Workspace Builds erstellt; als abgeschlossen gilt die Aufgabe, wenn ein Vorschlag ausgewählt und implementiert, die Übergabe der Image-Referenz validiert und das Streaming der Build-Logs behandelt wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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?
- Vorherrschende Sprache
- Go
- Sterne
- 300
- Forks
- 64
- Ø Merge
- 20 Min.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus coder/envbuilder
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
coder/envbuilder#506 ·
-
bug envbuilder needs-investigation
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
coder/envbuilder#495 ·
-
envbuilder Feature
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 56/100
coder/envbuilder#492 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
coder/envbuilder#484 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
coder/envbuilder#483 ·
Alle Issues in coder/envbuilder
Ähnliche Issues
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
microsoft/agent-framework-go#1179 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
infiniflow/ragflow#20223 · 1 Reaktion ·
-
bug needs triage pkg/translator/faro
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · 1 Kommentar ·