# LimitRange and ResourceQuota

{% hint style="info" %}
For LimitRange and ResourceQuota support, a minimum exporter version of v1.0.42 is required.
{% endhint %}

## LimitRange

In some cases, you may want to constrain minimum and maximum computing resource usage per pod or container in a namespace by configuring LimitRange. PerfectScale respects your policy to constrain the resource allocations that you specified for your pods and containers in the namespace and doesn't contradict it.

When PerfectScale detects that its recommended resource allocation either exceeds or falls below the specified LimitRange for your pods and containers, the relevant indicator will be raised.&#x20;

<figure><img src="/files/RuXnwaSBBw8zXCxqja4M" alt="" width="563"><figcaption><p>LimitRange detected</p></figcaption></figure>

Hover over the indicator or click on the workload to view detailed information.

<figure><img src="/files/ip2qDsvxOwq60e36N22F" alt="" width="563"><figcaption><p>LimitRange details</p></figcaption></figure>

{% hint style="info" %}
For automated workloads, if the recommended resource allocation exceeds or falls below the specified LimitRange, PerfectScale will not apply the recommendation. Instead, it will automatically adjust the resource allocation to the maximum or minimum value the LimitRange allows, ensuring compliance with your predefined constraints.

![](/files/7lki0zK4SMFmsoGHUPp2)
{% endhint %}

{% hint style="warning" %}
When introducing or updating a LimitRange into an automated cluster, it is necessary to pause automation for at least 30 minutes to ensure that resource constraints are applied correctly before resuming automated operations.
{% endhint %}

## ResoureQuota

In some scenarios, you might want to constrain the overall resource consumption within a namespace by ResourceQuota to ensure that the total usage across all workloads stays within specific limitations.&#x20;

When PerfectScale detects the ResourceQuota configured, the relevant indicator will be raised.&#x20;

<figure><img src="/files/pfoql2rIowwjv7mILUBz" alt="" width="563"><figcaption><p>ResourceQuota detected</p></figcaption></figure>

Hover over the indicator or click on the workload to access the details.

{% hint style="info" %}
For **automated workloads**, if a ResourceQuota is detected, PerfectScale will apply recommendations in **decrease-only** mode to ensure constraints are respected. However, recommendations will still be available.
{% endhint %}

{% hint style="warning" %}
When introducing or updating a ResourceQuota into an automated cluster, it is necessary to pause automation for at least 30 minutes to ensure that resource constraints are applied correctly before resuming automated operations.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.perfectscale.io/visibility-and-optimization/podfit-or-vertical-pod-right-sizing/limitrange-and-resourcequota.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
