@@ -26,23 +26,41 @@ import (
2626// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
2727// Important: Run "make" to regenerate code after modifying this file
2828
29+ // Hypervisor Condition Types
30+ // type of condition in CamelCase or in foo.example.com/CamelCase.
2931const (
32+ // ConditionTypeOnboarding is the type of condition for onboarding status
33+ ConditionTypeOnboarding = "Onboarding"
34+
3035 // ConditionTypeReady is the type of condition for ready status of a hypervisor
31- ConditionTypeReady = "Ready"
36+ ConditionTypeReady = "Ready"
37+
38+ // ConditionTypeTerminating is the type of condition for terminating status of a hypervisor
3239 ConditionTypeTerminating = "Terminating"
33- ConditionTypeTainted = "Tainted"
3440
35- // Reasons for the various being ready...
36- ConditionReasonReadyReady = "ready"
37- // or not
38- ConditionReasonReadyMaintenance = "maintenance"
39- ConditionReasonReadyEvicted = "evicted"
41+ // ConditionTypeTainted is the type of condition for tainted status of a hypervisor
42+ ConditionTypeTainted = "Tainted"
4043
41- // HypervisorMaintenance "enum"
42- MaintenanceUnset = ""
43- MaintenanceManual = "manual"
44- MaintenanceAuto = "auto"
45- MaintenanceHA = "ha"
44+ // ConditionTypeTraitsUpdated is the type of condition for traits updated status of a hypervisor
45+ ConditionTypeTraitsUpdated = "TraitsUpdated"
46+
47+ // ConditionTypeAggregatesUpdated is the type of condition for aggregates updated status of a hypervisor
48+ ConditionTypeAggregatesUpdated = "AggregatesUpdated"
49+ )
50+
51+ // Condition Reasons
52+ // The value should be a CamelCase string.
53+ const (
54+ // ConditionTypeReady reasons
55+ ConditionReasonReadyReady = "Ready"
56+ ConditionReasonReadyMaintenance = "Maintenance"
57+ ConditionReasonReadyEvicted = "Evicted"
58+
59+ // ConditionTypeOnboarding reasons
60+ ConditionReasonInitial = "Initial"
61+ ConditionReasonOnboarding = "Onboarding"
62+ ConditionReasonTesting = "Testing"
63+ ConditionReasonAborted = "Aborted"
4664)
4765
4866// HypervisorSpec defines the desired state of Hypervisor
@@ -89,11 +107,20 @@ type HypervisorSpec struct {
89107 InstallCertificate bool `json:"installCertificate"`
90108
91109 // +kubebuilder:optional
92- // +kubebuilder:validation:Enum:="";manual;auto;ha
110+ // +kubebuilder:validation:Enum:="";manual;auto;ha;termination
93111 // Maintenance indicates whether the hypervisor is in maintenance mode.
94112 Maintenance string `json:"maintenance,omitempty"`
95113}
96114
115+ const (
116+ // HypervisorMaintenance "enum"
117+ MaintenanceUnset = ""
118+ MaintenanceManual = "manual" // manual maintenance mode by external user
119+ MaintenanceAuto = "auto" // automatic maintenance mode
120+ MaintenanceHA = "ha" // high availability maintenance mode
121+ MaintenanceTermination = "termination" // internal use only, when node is terminating state
122+ )
123+
97124type Instance struct {
98125 // Represents the instance ID (uuidv4).
99126 ID string `json:"id"`
0 commit comments