@@ -93,6 +93,12 @@ type HypervisorSpec struct {
9393 // Aggregates are used to apply aggregates to the hypervisor.
9494 Aggregates []string `json:"aggregates"`
9595
96+ // +kubebuilder:default:={}
97+ // AllowedProjects defines which openstack projects are allowed to schedule
98+ // instances on this hypervisor. The values of this list should be project
99+ // uuids. If left empty, all projects are allowed.
100+ AllowedProjects []string `json:"allowedProjects"`
101+
96102 // +kubebuilder:default:=true
97103 // HighAvailability is used to enable the high availability handling of the hypervisor.
98104 HighAvailability bool `json:"highAvailability"`
@@ -190,15 +196,24 @@ type OperatingSystemStatus struct {
190196 GardenLinuxFeatures []string `json:"gardenLinuxFeatures,omitempty"`
191197}
192198
193- // Current capabilities reported by libvirt.
194- type CapabilitiesStatus struct {
199+ // Compute capabilities relevant to check if a VM
200+ // can be scheduled on the hypervisor.
201+ type Capabilities struct {
195202 // +kubebuilder:default:=unknown
196- // The hosts CPU architecture (not the guests).
197- HostCpuArch string `json:"cpuArch,omitempty"`
198- // Total host memory available as a sum of memory over all numa cells.
199- HostMemory resource.Quantity `json:"memory,omitempty"`
200- // Total host cpus available as a sum of cpus over all numa cells.
201- HostCpus resource.Quantity `json:"cpus,omitempty"`
203+ // The available domain cpu architecture.
204+ Arch string `json:"arch,omitempty"`
205+ // +kubebuilder:default:=unknown
206+ // The supported type of virtualization for domains, such as "ch".
207+ HypervisorType string `json:"hypervisorType,omitempty"`
208+ // +kubebuilder:default:=[]
209+ // Supported devices for domains, such as "video".
210+ SupportedDevices []string `json:"supportedDevices,omitempty"`
211+ // +kubebuilder:default:=[]
212+ // Supported cpu modes for domains, such as "host-passthrough".
213+ SupportedCpuModes []string `json:"supportedCpuModes,omitempty"`
214+ // +kubebuilder:default:=[]
215+ // Supported features for domains, such as "sev" or "sgx".
216+ SupportedFeatures []string `json:"supportedFeatures,omitempty"`
202217}
203218
204219// HypervisorStatus defines the observed state of Hypervisor
@@ -216,8 +231,20 @@ type HypervisorStatus struct {
216231 // Represents the Hypervisor hosted Virtual Machines
217232 Instances []Instance `json:"instances,omitempty"`
218233
219- // The capabilities of the hypervisors as reported by libvirt.
220- Capabilities CapabilitiesStatus `json:"capabilities,omitempty"`
234+ // Auto-discovered compute capabilities relevant to check if a VM
235+ // can be scheduled on the hypervisor.
236+ Capabilities Capabilities `json:"capabilities,omitempty"`
237+
238+ // +kubebuilder:default:={}
239+ // Auto-discovered capacity available in total on the hypervisor.
240+ // The remaining physical capacity can be calculated
241+ // as Capacity - Allocation.
242+ Capacity map [string ]resource.Quantity `json:"capacity,omitempty"`
243+
244+ // +kubebuilder:default:={}
245+ // Auto-discovered capacity currently allocated by instances
246+ // on the hypervisor. Note that this does not include reserved capacity.
247+ Allocation map [string ]resource.Quantity `json:"allocation,omitempty"`
221248
222249 // +kubebuilder:default:=0
223250 // Represent the num of instances
0 commit comments