Skip to content

[Feature] Support configuring volatile overlayfs option for all writable layers #730

@Fricounet

Description

@Fricounet

Feature Description

Add a configuration knob to the nydus-snapshotter (for example overlayfs_volatile = true) so that operators can enable the volatile mount option globally without needing to inject snapshot labels through the container runtime stack.

Problem and Use Case

The nydus snapshotter already supports the volatile overlayfs mount option via the snapshot label containerd.io/snapshot/overlay.volatile with the two mount paths in snapshot/snapshot.go.

However, I couldnt' find a straightforward way to set this label from a Kubernetes environment:

  • The kubelet has no mechanism to pass snapshotter labels to containerd.
  • The CRI API does not expose snapshot-level options.
  • containerd's CRI plugin has no config field (like default_snapshot_opts) to inject snapshot labels globally. (it does have something for the base overlayfs snapshotter but that won't work with nydus I think)

The volatile option skips sync on the overlayfs upper layer, which significantly improves write performance for ephemeral container filesystems. This is a safe trade-off for most container workloads where the writable layer does not need to survive a crash.

Questions

  1. Is there a supported way today to pass the containerd.io/snapshot/overlay.volatile label to the snapshotter from a Kubernetes/containerd deployment that I am missing? In which case, maybe we just need to document it.
  2. If not, would it make sense to add a nydus-snapshotter configuration option (e.g., in the TOML config) to unconditionally enable volatile on all active (writable) overlayfs mounts?

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

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