Limit Range
You can create a LimitRange policy to constrain virtual cluster resource allocation. vCluster creates the LimitRange on the host in the same namespace as vCluster itself. LimitRange only applies to synced resources, such as pods.
Example
If you would normally deploy the following LimitRange:
apiVersion: v1
kind: LimitRange
metadata:
name: vcluster-limit-range
spec:
limits:
- default:
memory: 512Mi
cpu: "1"
defaultRequest:
memory: 128Mi
cpu: 100m
type: Container
Instead configure the LimitRange in your vcluster.yaml
config file like this:
limitRange:
enabled: true
default:
memory: 512Mi
cpu: "1"
defaultRequest:
memory: 128Mi
cpu: 100m
Config reference
limitRange
required object pro
LimitRange specifies limit range options.
limitRange
required object proenabled
required boolean false pro
Enabled defines if the limit range should be deployed by vCluster.
enabled
required boolean false prodefault
required object pro
Default are the default limits for the limit range
default
required object prodefaultRequest
required object pro
DefaultRequest are the default request options for the limit range
defaultRequest
required object 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