kubernetes: build with an initContainer or a Job
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- kubernetes, terraform
- 领域
- cloud, infrastructure
调研方向
未指定文件或测试。首先检查当前的 Kubernetes deployment 和 Terraform 资源,然后跟踪 envbuilder 在 workspace 启动期间如何执行构建;完成标准是选择并实现一个提案、验证镜像引用的交接,并处理构建日志流式传输。
由索引模型根据 Issue 内容生成。
描述
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?
- 主要语言
- Go
- 星标
- 300
- 派生
- 64
- 平均合并
- 20 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/envbuilder 的其他 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
coder/envbuilder#506 ·
-
bug envbuilder needs-investigation
难度 4/5 3-5 天 新手友好度 35/100
coder/envbuilder#495 ·
-
envbuilder Feature
难度 3/5 1-2 天 新手友好度 56/100
coder/envbuilder#492 ·
-
难度 4/5 3-5 天 新手友好度 25/100
coder/envbuilder#484 ·
-
难度 3/5 1-2 天 新手友好度 38/100
coder/envbuilder#483 ·
相似的 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 76/100
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 70/100
microsoft/agent-framework-go#1179 ·
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
infiniflow/ragflow#20223 · 1 个 reaction ·
-
bug needs triage pkg/translator/faro
难度 2/5 1-3 小时 新手友好度 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · 1 条评论 ·