How to set resources limits CPU and RAM (memory) for container runner

You are able to set resource limits for containers that will be run with a job inside them by setting the limits within your config.yml.

You can do this by adding a spec section to your config.yml at the same level as the token you have defined. An example of this can be found below limiting the CPU to 500m and the ram to 256Mi.

agent:
  resourceClasses:
    my-namespace/my-resourceClass:
      token: MY_TOKEN
      spec:
        containers:
          - resources:
              limits:
                cpu: 500m
                memory: 256Mi
        nodeSelector:
          key: value

Additional Resources

More information can be found on the link below:

https://circleci.com/docs/container-runner/#resource-class-configuration-custom-pod

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.