@@ -27,6 +27,11 @@ import (
2727// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
2828// Important: Run "make" to regenerate code after modifying this file
2929
30+ const (
31+ // ConditionTypeReady is the type of condition for ready status of a hypervisor
32+ ConditionTypeReady = "Ready"
33+ )
34+
3035// HypervisorSpec defines the desired state of Hypervisor
3136type HypervisorSpec struct {
3237 // +kubebuilder:validation:Optional
@@ -41,10 +46,30 @@ type HypervisorSpec struct {
4146 // EvacuateOnReboot request an evacuation of all instances before reboot.
4247 EvacuateOnReboot bool `json:"evacuateOnReboot"`
4348
49+ // +kubebuilder:default:=true
50+ // LifecycleEnabled enables the lifecycle management of the hypervisor via hypervisor-operator.
51+ LifecycleEnabled bool `json:"lifecycleEnabled"`
52+
53+ // +kubebuilder:default:=false
54+ // SkipTests skips the tests during the onboarding process.
55+ SkipTests bool `json:"skipTests"`
56+
57+ // +kubebuilder:default:={}
58+ // CustomTraits are used to apply custom traits to the hypervisor.
59+ CustomTraits []string `json:"customTraits"`
60+
61+ // +kubebuilder:default:=true
62+ // HighAvailability is used to enable the high availability handling of the hypervisor.
63+ HighAvailability bool `json:"highAvailability"`
64+
4465 // +kubebuilder:default:=false
4566 // Require to issue a certificate from cert-manager for the hypervisor, to be used for
4667 // secure communication with the libvirt API.
4768 CreateCertManagerCertificate bool `json:"createCertManagerCertificate"`
69+
70+ // +kubebuilder:default:=true
71+ // InstallCertificate is used to enable the installations of the certificates via kvm-node-agent.
72+ InstallCertificate bool `json:"installCertificate"`
4873}
4974
5075type Instance struct {
@@ -152,11 +177,13 @@ type HypervisorStatus struct {
152177// +kubebuilder:object:root=true
153178// +kubebuilder:subresource:status
154179// +kubebuilder:resource:scope=Cluster,shortName=hv
155- // +kubebuilder:printcolumn:JSONPath=".status.node",name="Node",type="string"
180+ // +kubebuilder:printcolumn:JSONPath=".status.conditions[?(@.type==\"Ready\")].reason",name="State",type="string"
181+ // +kubebuilder:printcolumn:JSONPath=".spec.lifecycleEnabled",name="Lifecycle",type="boolean"
182+ // +kubebuilder:printcolumn:JSONPath=".spec.highAvailability",name="High Availability",type="boolean"
156183// +kubebuilder:printcolumn:JSONPath=".status.operatingSystem.prettyVersion",name="Version",type="string"
157184// +kubebuilder:printcolumn:JSONPath=".status.numInstances",name="Instances",type="integer"
158- // +kubebuilder:printcolumn:JSONPath=".status.operatingSystem.hardwareModel",name="Hardware",type="string"
159- // +kubebuilder:printcolumn:JSONPath=".status.operatingSystem.kernelRelease",name="Kernel",type="string"
185+ // +kubebuilder:printcolumn:JSONPath=".status.operatingSystem.hardwareModel",name="Hardware",type="string",priority=2
186+ // +kubebuilder:printcolumn:JSONPath=".status.operatingSystem.kernelRelease",name="Kernel",type="string",priority=2
160187// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type="date"
161188
162189// Hypervisor is the Schema for the hypervisors API
0 commit comments