Skip to content

expose calculated swap limit metric for containers #132228

Open
@ajaysundark

Description

@ajaysundark

What would you like to be added?

Currently, when LimitedSwap is enabled, the Kubelet calculates a swap limit for each container. However, this calculated value is not exposed, leaving users with no visibility into this critical resource constraint.

This transparency is needed to effectively monitor swap resource limits and troubleshoot swap-related issues.

I'd like to propose introducting of a new kubelet metric, container_spec_swap_limit_bytes, to report the calculated swap limit for each container and be available at the /metrics/resource endpoint.

Why is this needed?

Exposing this metric would provide much-needed visibility for calculated swap limits per container and align the behavior with other container resource metrics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions