Resources are in a beta state and may not be available on your Apollo Hub. Contact your Palantir representative to learn more.
This extension of the specification describes how a product declares the necessary compute resources and is modeled after the Kubernetes container resource specification. The following types of compute resources are supported:
When defining an Apollo Product’s CPU and memory requirements, developers may include both the minimum resource quantities each service replica must have available to it (“requests”) and the maximum quantities of these resources that each replica should not exceed (“limits”).
Resource requests and limits are applied to each replica of a service.
These requests and limits can be defined under a top-level resources
field in an Apollo Product's configuration.yml
file:
Copied!1 2 3 4 5 6 7 8
# configuration.yml resources: requests: cpu: 0.5 memory: 1Gi limits: cpu: 2 memory: 4Gi
Supported memory units are:
CPU values can be provided as unit-less floating point values indicating the number of CPU cores. For example, 0.5 CPU is interpreted as 50% usage of a single core.
Both resources.requests
and resources.limits
are optional fields, as are their subfields. Absent values are handled in the following way:
0.25
is used.1G
is used.