From 97899e05117e37783d53e13b87dd9023c2995105 Mon Sep 17 00:00:00 2001 From: PannagaRamamanohara Date: Wed, 17 Jul 2024 16:00:51 -0400 Subject: [PATCH] update LocalStorageCapacityIsolationFSQuotaMonitoring to beta Signed-off-by: PannagaRamamanohara --- .../manage-resources-containers.md | 21 ++++++++++++++++--- ...-capacity-isolation-fs-quota-monitoring.md | 17 ++++++++------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/content/en/docs/concepts/configuration/manage-resources-containers.md b/content/en/docs/concepts/configuration/manage-resources-containers.md index 4d21ec9950..de5babde9c 100644 --- a/content/en/docs/concepts/configuration/manage-resources-containers.md +++ b/content/en/docs/concepts/configuration/manage-resources-containers.md @@ -463,7 +463,7 @@ that file but the kubelet does not categorize the space as in use. {{% /tab %}} {{% tab name="Filesystem project quota" %}} -{{< feature-state for_k8s_version="v1.15" state="alpha" >}} +{{< feature-state feature_gate_name="LocalStorageCapacityIsolationFSQuotaMonitoring" >}} Project quotas are an operating-system level feature for managing storage use on filesystems. With Kubernetes, you can enable project @@ -489,13 +489,21 @@ If a file is created and deleted, but has an open file descriptor, it continues to consume space. Quota tracking records that space accurately whereas directory scans overlook the storage used by deleted files. +To use quotas to track a pod's resource usage, the pod must be in +a user namespace. Within user namespaces, the kernel restricts changes +to projectIDs on the filesystem, ensuring the reliability of storage +metrics calculated by quotas. + If you want to use project quotas, you should: * Enable the `LocalStorageCapacityIsolationFSQuotaMonitoring=true` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) using the `featureGates` field in the - [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/) - or the `--feature-gates` command line flag. + [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/). + +* Ensure the `UserNamespacesSupport` + [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) + is enabled, and that the kernel, CRI implementation and OCI runtime support user namespaces. * Ensure that the root filesystem (or optional runtime filesystem) has project quotas enabled. All XFS filesystems support project quotas. @@ -511,6 +519,13 @@ If you want to use project quotas, you should: mounted with project quotas enabled. For both XFS and ext4fs, the mount option is named `prjquota`. + +If you don't want to use project quotas, you should: + +* Disable the `LocalStorageCapacityIsolationFSQuotaMonitoring` + [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) + using the `featureGates` field in the + [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/). {{% /tab %}} {{< /tabs >}} diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/local-storage-capacity-isolation-fs-quota-monitoring.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/local-storage-capacity-isolation-fs-quota-monitoring.md index ee25d6ed42..3449033dc7 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates/local-storage-capacity-isolation-fs-quota-monitoring.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates/local-storage-capacity-isolation-fs-quota-monitoring.md @@ -9,11 +9,14 @@ stages: - stage: alpha defaultValue: false fromVersion: "1.15" + toVersion: "1.30" + - stage: beta + defaultValue: false + fromVersion: "1.31" --- -When `LocalStorageCapacityIsolation` -is enabled for -[local ephemeral storage](/docs/concepts/configuration/manage-resources-containers/) -and the backing filesystem for [emptyDir volumes](/docs/concepts/storage/volumes/#emptydir) -supports project quotas and they are enabled, use project quotas to monitor -[emptyDir volume](/docs/concepts/storage/volumes/#emptydir) storage consumption rather than -filesystem walk for better performance and accuracy. +When `LocalStorageCapacityIsolation` +is enabled for +[local ephemeral storage](/docs/concepts/configuration/manage-resources-containers/), +the backing filesystem for [emptyDir volumes](/docs/concepts/storage/volumes/#emptydir) supports project quotas, +and `UserNamespacesSupport` is enabled, +project quotas are used to monitor `emptyDir` volume storage consumption rather than using filesystem walk, ensuring better performance and accuracy. \ No newline at end of file