Skip to content

Fix kubernetes:S6864: Memory limits should be enforced #420

Description

@lhein

Summary

Sonar rule kubernetes:S6864 flags containers that define resource requests but no limits.memory. Without a memory limit a container can consume all available memory on a node, starving other workloads and potentially causing a DoS condition.

Change

In config/samples/deploy.yaml, the standalone container had requests.memory: 600Mi but no limits.memory. Added limits.memory: 600Mi to match the request value.

Prevention

No local Kubernetes linter is configured in this repo — Sonar remains the guard. Adding kube-linter or kubeconform to CI would catch this class of issue earlier.

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