kubernetes: build with an initContainer or a Job
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- kubernetes, terraform
- Lĩnh vực
- cloud, infrastructure
Hướng nghiên cứu
Không có tệp hoặc bài kiểm thử nào được nêu tên. Hãy bắt đầu bằng cách xem xét Kubernetes deployment hiện tại và các tài nguyên Terraform, sau đó truy vết cách envbuilder thực hiện các bản build trong quá trình khởi động workspace; công việc được xem là hoàn tất khi đã chọn và triển khai một đề xuất, xác thực việc bàn giao image reference và xử lý việc streaming build log.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Go
- Star
- 300
- Fork
- 64
- Merge trung bình
- 20 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/envbuilder
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
coder/envbuilder#506 ·
-
bug envbuilder needs-investigation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
coder/envbuilder#495 ·
-
envbuilder Feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
coder/envbuilder#492 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
coder/envbuilder#484 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
coder/envbuilder#483 ·
Tất cả issue của coder/envbuilder
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove obsolete ipAllocationPolicy field from containernodepool-subnetworkref test dependencyĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
GoogleCloudPlatform/k8s-config-connector#13462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coder/coder#29955 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/TypeScript#64453 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OpenAI-compatible endpoint: response ids have only 999 possible values (chatcmpl-rand.Intn(999))Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày