resources
Description
The resources property specifies the desired resources to allocate to the DataPower containers in the StatefulSet.
All fields within resources use Kubernetes resource quantity types, thus support int or string values (e.g. integer 1 or string "1000m" results in a single CPU core being requested). Consult the Kubernetes documentation for specific guidance on syntax.
Notice
- In version
1.6.14,limits.cpuwas added to enable setting independent CPU request and limit. - In versions
1.6.5and1.6.14, the minimum allowed values were changed, see the release notes for details. See the Constraints sections within CPU and Memory below for version-specific values.
CPU
>= 1.6.14
You are able to set both requests and limits for CPU. The CPU limit must be greater than or equal to the requested CPU.
< 1.6.14
Set the desired CPU via requests.cpu; there is no limits.cpu property. When creating the StatefulSet, the DataPower Operator will set:
container.limits.cpu == container.requests.cpu
Defaults
- The default CPU request for nonproduction is
1or1000m - The default CPU request for production is
4or4000m
Constraints (>= 1.6.14)
The following constraints apply to CPU when the operator version is 1.6.14 or higher:
- Partial CPU values are supported.
- CPU request and limit can be specified independently.
- Minimum CPU request is now
100m. - Minimum CPU limit is now
500m.
Constraints (>= 1.6.5 < 1.6.14)
The following constraints apply to CPU when the operator version is 1.6.5 or higher and less than 1.6.14:
- Minimum cores requested must be
500m(equivalent to 0.5 CPU) - Partial CPU values (such as
1500m) are supported
Constraints (< 1.6.5)
The following constraints apply to CPU when the operator version is lower than 1.6.5:
- Minimum cores requested must be
1or1000m - Partial CPU values (such as
1500m) are not supported
Memory
You are able to set both requests and limits for memory. The memory limit must be greater than or equal to the requested memory.
Defaults
- The default memory request is
4Gi - The default memory limit is
8Gi
Constraints (>= 1.6.5)
The following constraints apply to memory when the operator version is 1.6.5 or higher:
- Minimum memory request and limit is
2Gi
Constraints (< 1.6.5)
The following constraints apply to memory when the operator version is lower than 1.6.5:
- Minimum memory request and limit is
4Gi
Examples
Default values for production
apiVersion: datapower.ibm.com/v1beta3
kind: DataPowerService
metadata:
name: example
spec:
resources:
requests:
cpu: 4
memory: 4Gi
limits:
cpu: 4
memory: 8Gi
...
Default values for nonproduction
apiVersion: datapower.ibm.com/v1beta3
kind: DataPowerService
metadata:
name: example
spec:
resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 1
memory: 8Gi
...
Minimum allowed values
apiVersion: datapower.ibm.com/v1beta3
kind: DataPowerService
metadata:
name: example
spec:
resources:
requests:
cpu: 100m
memory: 2Gi
limits:
cpu: 500m
memory: 2Gi
...