@@ -40,6 +40,143 @@ const (
4040 GuestSoftPowerOffDefaultTimeout = 5 * time .Minute
4141)
4242
43+ // VSphereVM's Ready condition and corresponding reasons that will be used in v1Beta2 API version.
44+ const (
45+ // VSphereVMReadyV1Beta2Condition is true if the VSphereVM's deletionTimestamp is not set, VSphereVM's
46+ // VirtualMachineProvisioned, VCenterAvailable and IPAddressClaimsFulfilled are true.
47+ VSphereVMReadyV1Beta2Condition = clusterv1 .ReadyV1Beta2Condition
48+
49+ // VSphereVMReadyV1Beta2Reason surfaces when the VSphereVM readiness criteria is met.
50+ VSphereVMReadyV1Beta2Reason = clusterv1 .ReadyV1Beta2Reason
51+
52+ // VSphereVMNotReadyV1Beta2Reason surfaces when the VSphereVM readiness criteria is not met.
53+ VSphereVMNotReadyV1Beta2Reason = clusterv1 .NotReadyV1Beta2Reason
54+
55+ // VSphereVMReadyUnknownV1Beta2Reason surfaces when at least one VSphereVM readiness criteria is unknown
56+ // and no VSphereVM readiness criteria is not met.
57+ VSphereVMReadyUnknownV1Beta2Reason = clusterv1 .ReadyUnknownV1Beta2Reason
58+ )
59+
60+ // VSphereVM's VirtualMachineProvisioned condition and corresponding reasons that will be used in v1Beta2 API version.
61+ const (
62+ // VSphereVMVirtualMachineProvisionedV1Beta2Condition documents the status of the VirtualMachine that is controlled
63+ // by the VSphereVM.
64+ VSphereVMVirtualMachineProvisionedV1Beta2Condition = "VirtualMachineProvisioned"
65+
66+ // VSphereVMVirtualMachineWaitingForCloneV1Beta2Reason documents the VirtualMachine that is controlled
67+ // by the VSphereVM waiting for the clone operation to complete.
68+ VSphereVMVirtualMachineWaitingForCloneV1Beta2Reason = "WaitingForClone"
69+
70+ // VSphereVMVirtualMachineWaitingForStaticIPAllocationV1Beta2Reason documents the VirtualMachine that is controlled
71+ // by the VSphereVM waiting for the allocation of a static IP address.
72+ VSphereVMVirtualMachineWaitingForStaticIPAllocationV1Beta2Reason = "WaitingForStaticIPAllocation"
73+
74+ // VSphereVMVirtualMachineWaitingForIPAddressV1Beta2Reason documents the VirtualMachine that is controlled
75+ // by the VSphereVM waiting for an IP address to be provisioned from the IPAM provider.
76+ VSphereVMVirtualMachineWaitingForIPAddressV1Beta2Reason = "WaitingForIPAddress"
77+
78+ // VSphereVMVirtualMachineWaitingForIPAllocationV1Beta2Reason documents the VirtualMachine that is controlled
79+ // by the VSphereVM waiting for the allocation of an IP address.
80+ // This is used when the dhcp4 or dhcp6 for a VirtualMachine is set and the VirtualMachine is waiting for the
81+ // relevant IP address to show up on the VM.
82+ VSphereVMVirtualMachineWaitingForIPAllocationV1Beta2Reason = "WaitingForIPAllocation"
83+
84+ // VSphereVMVirtualMachinePoweringOnV1Beta2Reason surfaces when the VirtualMachine that is controlled
85+ // by the VSphereVM is executing the power on sequence.
86+ VSphereVMVirtualMachinePoweringOnV1Beta2Reason = "PoweringOn"
87+
88+ // VSphereVMVirtualMachineProvisionedV1Beta2Reason surfaces when the VirtualMachine that is controlled
89+ // by the VSphereVM is provisioned.
90+ VSphereVMVirtualMachineProvisionedV1Beta2Reason = clusterv1 .ProvisionedV1Beta2Reason
91+
92+ // VSphereVMVirtualMachineTaskFailedV1Beta2Reason surfaces when a task for the VirtualMachine that is controlled
93+ // by the VSphereVM failed; the reconcile look will automatically retry the operation,
94+ // but a user intervention might be required to fix the problem.
95+ VSphereVMVirtualMachineTaskFailedV1Beta2Reason = "TaskFailed"
96+
97+ // VSphereVMVirtualMachineNotFoundByBIOSUUIDV1Beta2Reason surfaces when the VirtualMachine that is controlled
98+ // by the VSphereVM can't be found by BIOS UUID.
99+ // Those kind of errors could be transient sometimes and failed VSphereVM are automatically
100+ // reconciled by the controller.
101+ VSphereVMVirtualMachineNotFoundByBIOSUUIDV1Beta2Reason = "NotFoundByBIOSUUID"
102+
103+ // VSphereVMVirtualMachineNotProvisionedV1Beta2Reason surfaces when the VirtualMachine that is controlled
104+ // by the VSphereVM is not provisioned.
105+ VSphereVMVirtualMachineNotProvisionedV1Beta2Reason = clusterv1 .NotProvisionedV1Beta2Reason
106+
107+ // VSphereVMVirtualMachineDeletingV1Beta2Reason surfaces when the VirtualMachine that is controlled
108+ // by the VSphereVM is being deleted.
109+ VSphereVMVirtualMachineDeletingV1Beta2Reason = clusterv1 .DeletingV1Beta2Reason
110+ )
111+
112+ // VSphereVM's VCenterAvailable condition and corresponding reasons that will be used in v1Beta2 API version.
113+ const (
114+ // VSphereVMVCenterAvailableV1Beta2Condition documents the availability of the VCenter hosting the VSphereVM.
115+ VSphereVMVCenterAvailableV1Beta2Condition = "VCenterAvailable"
116+
117+ // VSphereVMVCenterAvailableV1Beta2Reason documents the VCenter hosting the VSphereVM
118+ // being available.
119+ VSphereVMVCenterAvailableV1Beta2Reason = clusterv1 .AvailableV1Beta2Reason
120+
121+ // VSphereVMVCenterUnreachableV1Beta2Reason documents the VCenter hosting the VSphereVM
122+ // cannot be reached.
123+ VSphereVMVCenterUnreachableV1Beta2Reason = "VCenterUnreachable"
124+ )
125+
126+ // VSphereVM's IPAddressClaimsFulfilled condition and corresponding reasons that will be used in v1Beta2 API version.
127+ const (
128+ // VSphereVMIPAddressClaimsFulfilledV1Beta2Condition documents the status of claiming an IP address
129+ // from an IPAM provider.
130+ VSphereVMIPAddressClaimsFulfilledV1Beta2Condition = "IPAddressClaimsFulfilled"
131+
132+ // VSphereVMIPAddressClaimsBeingCreatedV1Beta2Reason documents that claims for the
133+ // IP addresses required by the VSphereVM are being created.
134+ VSphereVMIPAddressClaimsBeingCreatedV1Beta2Reason = "IPAddressClaimsBeingCreated"
135+
136+ // VSphereVMIPAddressClaimsWaitingForIPAddressV1Beta2Reason documents that claims for the
137+ // IP addresses required by the VSphereVM are waiting for IP addresses.
138+ VSphereVMIPAddressClaimsWaitingForIPAddressV1Beta2Reason = "WaitingForIPAddress"
139+
140+ // VSphereVMIPAddressClaimsFulfilledV1Beta2Reason documents that claims for the
141+ // IP addresses required by the VSphereVM are fulfilled.
142+ VSphereVMIPAddressClaimsFulfilledV1Beta2Reason = "Fulfilled"
143+
144+ // VSphereVMIPAddressClaimsNotFulfilledV1Beta2Reason documents that claims for the
145+ // IP addresses required by the VSphereVM are not fulfilled.
146+ VSphereVMIPAddressClaimsNotFulfilledV1Beta2Reason = "NotFulfilled"
147+ )
148+
149+ // VSphereVM's GuestSoftPowerOffSucceeded condition and corresponding reasons that will be used in v1Beta2 API version.
150+ const (
151+ // VSphereVMGuestSoftPowerOffSucceededV1Beta2Condition documents the status of performing guest initiated
152+ // graceful shutdown.
153+ VSphereVMGuestSoftPowerOffSucceededV1Beta2Condition string = "GuestSoftPowerOffSucceeded"
154+
155+ // VSphereVMGuestSoftPowerOffInProgressV1Beta2Reason documents that the guest receives
156+ // a graceful shutdown request.
157+ VSphereVMGuestSoftPowerOffInProgressV1Beta2Reason = "InProgress"
158+
159+ // GuestSoftPowerOffFailedV1Beta2Reason documents that the graceful
160+ // shutdown request failed.
161+ VSphereVMGuestSoftPowerOffFailedV1Beta2Reason = "Failed"
162+
163+ // GuestSoftPowerOffSucceededV1Beta2Reason documents that the graceful
164+ // shutdown request succeeded.
165+ VSphereVMGuestSoftPowerOffSucceededV1Beta2Reason = "Succeeded"
166+ )
167+
168+ // VSphereVM's PCIDevicesDetached condition and corresponding reasons that will be used in v1Beta2 API version.
169+ const (
170+ // VSphereVMPCIDevicesDetachedV1Beta2Condition documents the status of the attached PCI devices on the VSphereVM.
171+ // It is a negative condition to notify the user that the device(s) is no longer attached to
172+ // the underlying VM and would require manual intervention to fix the situation.
173+ VSphereVMPCIDevicesDetachedV1Beta2Condition string = "PCIDevicesDetached"
174+
175+ // VSphereVMPCIDevicesDetachedNotFoundV1Beta2Reason documents the VSphereVM not having the PCI device attached during VM startup.
176+ // This would indicate that the PCI devices were removed out of band by an external entity.
177+ VSphereVMPCIDevicesDetachedNotFoundV1Beta2Reason = "NotFound"
178+ )
179+
43180// VSphereVMSpec defines the desired state of VSphereVM.
44181type VSphereVMSpec struct {
45182 VirtualMachineCloneSpec `json:",inline"`
@@ -188,7 +325,8 @@ type VSphereVMStatus struct {
188325// See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.
189326type VSphereVMV1Beta2Status struct {
190327 // conditions represents the observations of a VSphereVM's current state.
191- // Known condition types are Paused.
328+ // Known condition types are Ready, VirtualMachineProvisioned, VCenterAvailable and IPAddressClaimsFulfilled,
329+ // GuestSoftPowerOffSucceeded, PCIDevicesDetached and Paused.
192330 // +optional
193331 // +listType=map
194332 // +listMapKey=type
0 commit comments