Skip to content

Fix kubernetes:S6897 + S6864: Add ephemeral-storage and memory limits to standalone container #422

Open

Description

@lhein

Summary

Two Sonar rules flagged missing resource constraints on the standalone container in config/samples/deploy.yaml:

  • kubernetes:S6897 — Storage requests should be specified: without requests.ephemeral-storage, the Kubernetes scheduler cannot make optimal placement decisions.
  • kubernetes:S6864 — Memory limits should be enforced: without limits.memory, a container can consume all available memory on a node, starving other workloads.

Change

Added to config/samples/deploy.yaml standalone container:

resources:
  limits:
    memory: "600Mi"
    ephemeral-storage: "500Mi"
  requests:
    cpu: "500m"
    memory: "600Mi"
    ephemeral-storage: "500Mi"

Prevention

No local Kubernetes linter configured — Sonar remains the guard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions