-
Notifications
You must be signed in to change notification settings - Fork 117
[Feature] Support configuring volatile overlayfs option for all writable layers #730
Description
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
- Is there a supported way today to pass the
containerd.io/snapshot/overlay.volatilelabel to the snapshotter from a Kubernetes/containerd deployment that I am missing? In which case, maybe we just need to document it. - If not, would it make sense to add a nydus-snapshotter configuration option (e.g., in the TOML config) to unconditionally enable
volatileon all active (writable) overlayfs mounts?
Related issues
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!