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

Aberta
#301 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
docker, go, typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.
Linguagem predominante
TypeScript
Estrelas
2
Forks
1
Merge médio
7h 17min
PRs com merge (30d)
197

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de shipkeepdev/shipkeep

Todas as issues de shipkeepdev/shipkeep

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.