When importing a namespace, if the namespace contains multiple ResourceQuota resources, the platform will select the smallest value for each quota item among all ResourceQuotas and merge them, ultimately creating a single ResourceQuota named default
.
Example:
The namespace to-import
to be imported contains the following resourcequota
resources:
After importing the to-import
namespace, the following default
ResourceQuota will be created in that namespace:
For each ResourceQuota, the quotas of resources is the minimum value between a
and b
.
When multiple ResourceQuotas exist in a namespace, Kubernetes validates each ResourceQuota independently. Therefore, after importing a namespace, it is recommended to delete all ResourceQuotas except for the default
one. This helps avoid complications in quota calculations due to multiple ResourceQuotas, which can easily lead to errors.
When importing a namespace, if the namespace contains multiple LimitRange resources, the platform cannot merge them into a single LimitRange. Since Kubernetes independently validates each LimitRange when multiple exist, and the behavior of which LimitRange's default values Kubernetes selects is unpredictable.
If the namespace only contains a single LimitRange, the platform will created a LimitRange named default
with the values from that LimitRange.
Therefore, before importing a namespace, only a single LimitRange should exist in the namespace. And after the namespace is imported it is recommended to delete the LimitRanges except for the one named default
to avoid unpredictable behavior caused by multiple LimitRanges.