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

Offen
#301 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
docker, go, typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
TypeScript
Sterne
2
Forks
1
Ø Merge
7 Std. 17 Min.
Gemergte PRs (30 T.)
197

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus shipkeepdev/shipkeep

Alle Issues in shipkeepdev/shipkeep

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.