<p>I want to deploy a Dapr application with limitations on the sidecar</p>
<pre class="lang-yaml prettyprint-override"><code>      annotations:
        dapr.io/enabled: &quot;true&quot;
        dapr.io/app-id: &quot;simple-js&quot;
        dapr.io/app-port: &quot;5001&quot;
        dapr.io/sidecar-cpu-limit: “200m”
        dapr.io/sidecar-cpu-request: “100m”
        dapr.io/sidecar-memory-limit: “200Mi”
        dapr.io/sidecar-memory-request: “100Mi”
</code></pre>
<p>but get these error messages:</p>
<p>time=&quot;2022-12-18T15:57:52.123897777Z&quot; level=warning msg=&quot;couldn't set container resource requirements: error parsing sidecar cpu limit: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]<em>[-+]?[0-9]</em>)$'. using defaults&quot; instance=dapr-sidecar-injector-858f7757f8-6dzdq scope=dapr.injector.container type=log ver=1.9.5</p>
<p>time=&quot;2022-12-18T16:07:57.422789042Z&quot; level=warning msg=&quot;couldn't set container resource requirements: error parsing sidecar memory limit: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]<em>[-+]?[0-9]</em>)$'. using defaults&quot; instance=dapr-sidecar-injector-858f7757f8-6dzdq scope=dapr.injector.container type=log ver=1.9.5</p>

Kai Walter
<p>Rookie error. It turned out when assembling the annotations from <a href="https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/#sidecar-resource-settings" rel="nofollow noreferrer">https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/#sidecar-resource-settings</a> and / or as suggested <a href="https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/#create-a-pod" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/#create-a-pod</a> I introduced special characters / double quotes which were not distinguishable in my editor (VS Code with my fancy 3270 Nerdfont):</p>
<pre class="lang-yaml prettyprint-override"><code>      annotations:
        dapr.io/enabled: &quot;true&quot;
        dapr.io/app-id: &quot;simple-js&quot;
        dapr.io/app-port: &quot;5001&quot;
        dapr.io/sidecar-cpu-limit: “200m”
        dapr.io/sidecar-cpu-request: “100m”
        dapr.io/sidecar-memory-limit: “200Mi”
        dapr.io/sidecar-memory-request: “100Mi”
</code></pre>
<p>Replacing the corrupt double quotes with correct ones fixed the problem</p>
<pre class="lang-yaml prettyprint-override"><code>      annotations:
        dapr.io/enabled: &quot;true&quot;
        dapr.io/app-id: &quot;simple-js&quot;
        dapr.io/app-port: &quot;5001&quot;
        dapr.io/sidecar-cpu-limit: &quot;200m&quot;
        dapr.io/sidecar-cpu-request: &quot;100m&quot;
        dapr.io/sidecar-memory-limit: &quot;200Mi&quot;
        dapr.io/sidecar-memory-request: &quot;100Mi&quot;
</code></pre>
<p>Now the limits also show when describing the pod with <code>kubectl</code></p>
<pre><code>    Limits:
      cpu:     200m
      memory:  200Mi
    Requests:
      cpu:      100m
      memory:   100Mi
</code></pre>
