Resource Limits
Fleet supports configuring CPU and memory resource requests and limits in two places:
-
Management cluster controllers: configured via the Helm chart’s
resourcesfield, as described on this page. -
Downstream cluster agents: configured per-cluster via the
agentResourcesfield on theClusterresource.
|
When running Fleet inside Rancher, use the For more information, refer to Configuration. |
Default Resources
Set a default for all controller containers using the top-level resources field:
resources:
limits:
cpu: 8000m
memory: 8Gi
requests:
cpu: 250m
memory: 768Mi
Pass this to Helm during installation or upgrade:
helm -n cattle-fleet-system upgrade --install fleet fleet/fleet \
--set resources.limits.cpu=8000m \
--set resources.limits.memory=8Gi \
--set resources.requests.cpu=250m \
--set resources.requests.memory=768Mi
Per-Component Overrides
Individual controller containers can override the default with component-specific settings. The supported component keys are:
-
fleetController: the main Fleet controller -
fleetCleanup: the cleanup controller -
fleetAgentmanagement: the agent management controller -
gitjob: the GitJob controller -
helmops: the HelmOps controller
If a component key is present, its value takes precedence over the default resources.limits and resources.requests.
To remove resource constraints for a container regardless of the default settings, set a component to an empty object {}.
Example values.yaml using per-component overrides:
resources:
limits:
cpu: 4000m
memory: 4Gi
requests:
cpu: 100m
memory: 256Mi
fleetController:
limits:
cpu: 8000m
memory: 8Gi
requests:
cpu: 250m
memory: 768Mi
gitjob: {} # no resource constraints for gitjob
helmops: {} # no resource constraints for helmops
In this example:
-
fleetControlleruses its own limits and requests. -
gitjobandhelmopshave no resource constraints applied. -
fleetCleanupandfleetAgentmanagementfall back to the top-level default.
Apply the configuration with Helm:
helm -n cattle-fleet-system upgrade --install fleet fleet/fleet \
-f values.yaml
Downstream Cluster Agent Resources
To configure resource limits and requests for the Fleet agent running on a specific downstream cluster, set agentResources on the corresponding Cluster resource:
apiVersion: fleet.cattle.io/v1alpha1
kind: Cluster
metadata:
name: my-cluster
namespace: fleet-default
spec:
agentResources:
limits:
cpu: 1000m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
This is independent of the management cluster controller settings above and applies only to the agent deployed on that downstream cluster.