kubernetes: build with an initContainer or a Job
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- kubernetes, terraform
- 領域
- cloud, infrastructure
調査の方向性
ファイルやテストは指定されていません。まず現在の Kubernetes deployment と Terraform リソースを確認し、次に workspace の起動時に envbuilder がどのようにビルドを行うかを追跡してください。1 つの提案を選択して実装し、イメージ参照の引き渡しを検証し、ビルドログのストリーミングに対処すれば完了です。
索引モデルが 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分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 ·
coder/envbuilder の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Bob Shell support オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
santhosh-tekuri/jsonschema#276 ·