> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/troubleshooting-and-resources/armory/general/resource-requests-on-custom-stages-does-not-work-error-got-map-expected-string.md).

# Resource requests on custom stages does not work- Error- got "map", expected "string"

### Issue <a href="#issue" id="issue"></a>

An organization may want to set a `resource request (CPU)` on jobs for custom stages. Improper settings can result in an error similar to the one below:`Create failed: error: error validating “STDIN”: error validating data: [ValidationError(Job.spec.template.spec.containers[0].resources.requests.cpu): invalid type for io.k8s.apimachinery.pkg.api.resource.Quantity: got “map”, expected “string”,` An example manifest snippet is provided below.

```
    spec:
     restartPolicy: Never
     containers:
     - name: ######
        image: ######:latest
        imagePullPolicy: Always
        resources:     ##### I ADDED THIS TO REQUEST RESOURCES
          requests:     ##### I ADDED THIS TO REQUEST RESOURCES
            cpu: 100m  ##### I ADDED THIS TO REQUEST RESOURCES
```

The above manifest will not work and results in the error: `resources.requests.cpu > invalid type > got “map”, expected “string”`*,* These settings can cause organizations to encounter situations where resources are not being used effectively or efficiently.

### Cause <a href="#cause" id="cause"></a>

This error is due to a known bug in Spinnaker Operator. The manifest field defined in the `KubernetesPreconfiguredJobProperties` class has `io.kubernetes.client.openapi.models.V1` Job type. This type is defined in the Kubernetes Open API models package. This package contains special JSON serializers e.g `io.kubernetes.client.custom.Quantity.QuantityAdapter`. The serializers must be used to get the correct JSON format.
