Replies: 1 comment
-
|
If designed in this way, it will be similar to https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1029-ephemeral-storage-quotas It is basically unnecessary for k8s, so there is really no need to consider adding hard restrictions such as xfs quota. Compared to the timeliness of temporary storage, it seems that the disadvantages outweigh the advantages |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Adding quota settings to snapshots is crucial for enhancing node stability. Currently, various snapshot types exist, and to simplify implementation and reduce complexity in specific snapshot implementations, it is recommended to centralize quota processing at the core layer. This proposal outlines a universal snapshot quota support mechanism.
Goals
Proposal
This proposal introduces modifications to the snapshotter interface and data structures to enable universal quota support. The changes are focused on the core snapshot layer to ensure consistency and simplify individual snapshot implementations.
Interface and Data Structure Modifications
Snapshotter Interface Enhancement:
Add a new interface to the snapshotter to explicitly declare quota support capability:
This interface method,
SupportedQuota(), will return a boolean value indicating whether the specific snapshotter implementation supports quota settings.creatContainerAPI Extension:Extend the
creatContainerAPI within the CRI (Container Runtime Interface) with a new field named'storage'. This field will be part of the container creation request and will contain the following internal data structures to handle quota settings:storage: { ignoreFailed: bool, // Indicates whether to ignore failure if quota setting is not supported. size: string, // Represents the storage quota size. Use string to differentiate between unset and '0'. }ignoreFailed: A boolean type field. If set totrue, the system will ignore failures that occur when attempting to set quotas on a snapshotter that does not support them.size: A string type field representing the storage quota size. Using a string type ensures a clear distinction between an unset quota value (empty string'') and a quota size explicitly set to zero ('0').Core Snapshot Quota Handling Steps
When the
storagefield with asizeparameter is provided during snapshot creation, the core snapshot layer will follow these steps:Check Snapshotter Quota Support: Invoke the
SupportedQuota()method of the snapshotter implementation to determine if it supports quota settings.Quota Setting Based on Support and
ignoreFailed:If the snapshotter supports quotas (
SupportedQuota()returnstrue): The core layer will proceed to set the quota label for the snapshot using the providedsize.If the snapshotter does not support quotas (
SupportedQuota()returnsfalse):If
ignoreFailedis set totrue: The core layer will take no action regarding quota setting and proceed with snapshot creation, effectively ignoring the quota request.If
ignoreFailedis set tofalse: The core layer will indicate a failure in the snapshot creation process, as a quota was requested but cannot be fulfilled by the underlying snapshotter, and theignoreFailedpolicy is not set to permit ignoring this failure.Specific Snapshot Implementation Requirements
Individual snapshot implementations are expected to adhere to the following:
quotasize(for reasons such as limitations of the underlying storage driver), it must return an appropriate error to the core layer. This error will be propagated to the user, indicating that the quota setting was unsuccessful for that specific snapshot.By centralizing the quota handling logic at the core layer and providing clear interfaces, this design promotes a more stable and manageable node environment.
/cc @dmcgowan @mikebrow
Beta Was this translation helpful? Give feedback.
All reactions