Resource Quota
You can control vCluster resource consumption by configuring a ResourceQuota. vCluster creates the ResourceQuota in the same namespace as vCluster itself. Resource quotas apply to all resources synced to the host cluster.
Example
If you would normally deploy the following ResourceQuota:
apiVersion: v1
kind: ResourceQuota
metadata:
name: pods-medium
spec:
hard:
cpu: "10"
memory: 20Gi
pods: "10"
scopeSelector:
matchExpressions:
- operator : In
scopeName: PriorityClass
values: ["medium"]
Instead configure the ResourceQuota in your vcluster.yaml
config file like this:
resourceQuota:
enabled: true
quota:
hard:
cpu: "10"
memory: 20Gi
pods: "10"
scopeSelector:
matchExpressions:
- operator : In
scopeName: PriorityClass
values: ["medium"]
Config reference
resourceQuota
required object pro
ResourceQuota specifies resource quota options.
resourceQuota
required object proenabled
required boolean false pro
Enabled defines if the resource quota should be enabled.
enabled
required boolean false proquota
required object pro
Quota are the quota options
quota
required object proscopeSelector
required object pro
ScopeSelector is the resource quota scope selector
scopeSelector
required object proscopes
required string[] pro
Scopes are the resource quota scopes
scopes
required string[] proannotations
required object pro
Annotations are extra annotations for this resource.
annotations
required object prolabels
required object pro
Labels are extra labels for this resource.
labels
required object pro