Opting for a Self-Hosted Builder in the Build Settings screen will require you to specify the amount of resources you want to allocate for the builder. Before doing this, however, you need to take into consideration the following aspects:
The maximum amount of resources you can allocate
When accessing the Build Settings section, you need to be aware of the maximum amount of resources available. Allocating more resources will cause your builds to fail.
This is equal to the maximum amount of node resources minus the following:
Bunnyshell builder overhead (250m CPU and 500Mi memory)
Example: if you have a cluster with 2 CPUs and 2GB memory, subtract 250mCPU, 500Mi memory and the resources required for Kubernetes and you will get the maximum amount of resources you can allocate for the builder.
Are you using a dedicated build cluster?
If you're not using a dedicated build cluster, you might need to allocate less than the maximum amount of resources. This is because there might be other Pods scheduled inside the nodes, which will decrease your available resources.
Allocating more memory
There might be situations when you encounter the error below:
ERROR: Builder has run out of allocated memory, try to increase the build resources memory limit.
This indicates that the image builder requires more memory. If the necessary amount is more than what's available on one node (see this section again), you need to increase the size of the nodes inside the cluster.
Simply increasing the number of nodes will not fix the issue.