1+ ---
12apiVersion : apiextensions.k8s.io/v1
23kind : CustomResourceDefinition
34metadata :
@@ -164,6 +165,27 @@ spec:
164165 description : MaintenanceReason provides the reason for manual maintenance
165166 mode.
166167 type : string
168+ overcommit :
169+ additionalProperties :
170+ type : number
171+ description : |-
172+ Overcommit specifies the desired overcommit ratio by resource type.
173+
174+ If no overcommit is specified for a resource type, the default overcommit
175+ ratio of 1.0 should be applied, i.e. the effective capacity is the same
176+ as the actual capacity.
177+
178+ If the overcommit ratio results in a fractional effective capacity,
179+ the effective capacity is expected to be rounded down. This allows
180+ gradually adjusting the hypervisor capacity.
181+
182+ It is validated that all overcommit ratios are greater than or equal to
183+ 1.0, if specified. For this we don't need extra validating webhooks.
184+ See: https://kubernetes.io/blog/2022/09/23/crd-validation-rules-beta/#crd-transition-rules
185+ type : object
186+ x-kubernetes-validations :
187+ - message : overcommit ratios must be >= 1.0
188+ rule : self.all(k, self[k] >= 1.0)
167189 reboot :
168190 default : false
169191 description : Reboot request an reboot after successful installation
@@ -258,7 +280,13 @@ spec:
258280 - type : string
259281 pattern : ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
260282 x-kubernetes-int-or-string : true
261- description : Auto-discovered capacity of the hypervisor.
283+ description : |-
284+ Auto-discovered capacity of the hypervisor.
285+
286+ Note that this capacity does not include the applied overcommit ratios,
287+ and represents the actual capacity of the hypervisor. Use the
288+ effective capacity field to get the capacity considering the applied
289+ overcommit ratios.
262290 type : object
263291 cells :
264292 description : Auto-discovered cells on this hypervisor.
@@ -282,12 +310,35 @@ spec:
282310 - type : string
283311 pattern : ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
284312 x-kubernetes-int-or-string : true
285- description : Auto-discovered capacity of this cell.
313+ description : |-
314+ Auto-discovered capacity of this cell.
315+
316+ Note that this capacity does not include the applied overcommit ratios,
317+ and represents the actual capacity of the cell. Use the effective capacity
318+ field to get the capacity considering the applied overcommit ratios.
286319 type : object
287320 cellID :
288321 description : Cell ID.
289322 format : int64
290323 type : integer
324+ effectiveCapacity :
325+ additionalProperties :
326+ anyOf :
327+ - type : integer
328+ - type : string
329+ pattern : ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
330+ x-kubernetes-int-or-string : true
331+ description : |-
332+ Auto-discovered capacity of this cell, considering the
333+ applied overcommit ratios.
334+
335+ In case no overcommit ratio is specified for a resource type, the default
336+ overcommit ratio of 1 should be applied, meaning the effective capacity
337+ is the same as the actual capacity.
338+
339+ If the overcommit ratio results in a fractional effective capacity, the
340+ effective capacity is expected to be rounded down.
341+ type : object
291342 required :
292343 - cellID
293344 type : object
@@ -415,6 +466,24 @@ spec:
415466 type : string
416467 type : array
417468 type : object
469+ effectiveCapacity :
470+ additionalProperties :
471+ anyOf :
472+ - type : integer
473+ - type : string
474+ pattern : ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
475+ x-kubernetes-int-or-string : true
476+ description : |-
477+ Auto-discovered capacity of the hypervisor, considering the
478+ applied overcommit ratios.
479+
480+ In case no overcommit ratio is specified for a resource type, the default
481+ overcommit ratio of 1 should be applied, meaning the effective capacity
482+ is the same as the actual capacity.
483+
484+ If the overcommit ratio results in a fractional effective capacity, the
485+ effective capacity is expected to be rounded down.
486+ type : object
418487 evicted :
419488 description : Evicted indicates whether the hypervisor is evicted.
420489 (no instances left with active maintenance mode)
@@ -550,4 +619,3 @@ spec:
550619 storage : true
551620 subresources :
552621 status : {}
553-
0 commit comments