Containers without a resources section run with no CPU or memory limit

オープン
#301 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, go, typescript

調査の方向性

Start with apps/api/src/modules/deployments/domain/container-plan.ts and agent/internal/actions/container_spec.go to trace how resource values reach Docker and placement. Read SPEC and the tests covering deployment plans and containers; the issue calls for a decision on default limits versus mandatory declarations before implementation. Done means containers always have CPU and memory limits, placement reserves those same values, SPEC documents the defaults, and a test covers an application without resources.

索引モデルが issue の本文から書いたものです。

説明

needs-decision

What

An application without a resources section gets no CPU or memory limit. The deployment plan produces cpuMillis: 0 and memoryBytes: 0 (apps/api/src/modules/deployments/domain/container-plan.ts), the agent passes them to Docker as "no limit" (agent/internal/actions/container_spec.go), and placement reserves nothing for it.

One application can then starve the others on the same server, by accident or on purpose. The process limit and log rotation do not cover CPU and memory.

Found by a security audit of the repository on 8 November 2026, still true on main.

Decision needed

  • Default limits for an application that declares none. Suggested: 1 CPU and 512 MiB, overridable in shipkeep.yml.
  • Whether declaring resources becomes mandatory instead.
  • Later: quotas per environment, and capacity kept back for the node's own services (agent, Caddy, Docker).

Done when

  • A container is never created without a CPU and a memory limit.
  • Placement reserves the same values it enforces.
  • SPEC states the defaults, and a test covers an application without resources.
主要言語
TypeScript
スター
2
フォーク
1
平均マージ
7時間 17分
マージ済み PR(30日)
197

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

shipkeepdev/shipkeep のほかの issue

shipkeepdev/shipkeep の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。