@@ -161,6 +161,31 @@ spec:
161161 - ha
162162 - termination
163163 type : string
164+ maintenanceReason :
165+ description : MaintenanceReason provides the reason for manual maintenance
166+ mode.
167+ 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)
164189 reboot :
165190 default : false
166191 description : Reboot request an reboot after successful installation
@@ -186,13 +211,34 @@ spec:
186211 - reboot
187212 - skipTests
188213 type : object
214+ x-kubernetes-validations :
215+ - message : spec is immutable when maintenance is 'termination'; can only
216+ change maintenance to 'ha'
217+ rule : ' !has(oldSelf.maintenance) || oldSelf.maintenance != '' termination''
218+ || self.maintenance == '' ha'' || self == oldSelf'
219+ - message : maintenanceReason must be non-empty when maintenance is 'manual'
220+ rule : ' !has(self.maintenance) || self.maintenance != '' manual'' || (has(self.maintenanceReason)
221+ && self.maintenanceReason.size() > 0)'
189222 status :
190223 description : HypervisorStatus defines the observed state of Hypervisor
191224 properties :
192225 aggregates :
193- description : Aggregates are the applied aggregates of the hypervisor.
226+ description : Aggregates are the applied aggregates of the hypervisor
227+ with their names and UUIDs.
194228 items :
195- type : string
229+ description : Aggregate represents an OpenStack aggregate with its
230+ name and UUID.
231+ properties :
232+ name :
233+ description : Name is the name of the aggregate.
234+ type : string
235+ uuid :
236+ description : UUID is the unique identifier of the aggregate.
237+ type : string
238+ required :
239+ - name
240+ - uuid
241+ type : object
196242 type : array
197243 allocation :
198244 additionalProperties :
@@ -234,7 +280,13 @@ spec:
234280 - type : string
235281 pattern : ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
236282 x-kubernetes-int-or-string : true
237- 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.
238290 type : object
239291 cells :
240292 description : Auto-discovered cells on this hypervisor.
@@ -258,12 +310,35 @@ spec:
258310 - type : string
259311 pattern : ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
260312 x-kubernetes-int-or-string : true
261- 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.
262319 type : object
263320 cellID :
264321 description : Cell ID.
265322 format : int64
266323 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
267342 required :
268343 - cellID
269344 type : object
@@ -391,6 +466,24 @@ spec:
391466 type : string
392467 type : array
393468 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
394487 evicted :
395488 description : Evicted indicates whether the hypervisor is evicted.
396489 (no instances left with active maintenance mode)
@@ -399,6 +492,10 @@ spec:
399492 description : HypervisorID is the unique identifier of the hypervisor
400493 in OpenStack.
401494 type : string
495+ hypervisorVersion :
496+ default : unknown
497+ description : Represents the Hypervisor version
498+ type : string
402499 instances :
403500 description : Represents the Hypervisor hosted Virtual Machines
404501 items :
@@ -460,8 +557,8 @@ spec:
460557 description : HardwareVendor
461558 type : string
462559 kernelCommandLine :
463- description : KernelCommandLine contains the raw kernel boot
464- parameters from /proc/cmdline.
560+ description : KernelCommandLine contains the raw kernel boot parameters
561+ from /proc/cmdline.
465562 type : string
466563 kernelName :
467564 description : KernelName
0 commit comments