Skip to content

Commit c38dec8

Browse files
Aad v1beta2 conditions to DevMachines with InMemory backend
1 parent 15ce36f commit c38dec8

File tree

4 files changed

+366
-9
lines changed

4 files changed

+366
-9
lines changed

api/v1beta1/v1beta2_condition_consts.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@ const (
157157
// (e.g. its status is missing).
158158
InvalidConditionReportedV1Beta2Reason = "InvalidConditionReported"
159159

160-
// NoReasonReportedV1Beta2Reason applies to a condition, usually read from an external object, that reports no reason.
161-
// Note: this could happen e.g. when an external object still uses Cluster API v1beta1 Conditions.
162-
NoReasonReportedV1Beta2Reason = "NoReasonReported"
163-
164160
// InternalErrorV1Beta2Reason surfaces unexpected errors reporting by controllers.
165161
// In most cases, it will be required to look at controllers logs to properly triage those issues.
166162
InternalErrorV1Beta2Reason = "InternalError"
@@ -198,4 +194,19 @@ const (
198194

199195
// InspectionFailedV1Beta2Reason applies to a condition when inspection of the underlying object failed.
200196
InspectionFailedV1Beta2Reason = "InspectionFailed"
197+
198+
// WaitingForClusterInfrastructureReadyV1Beta2Reason documents an infra Machine waiting for the cluster
199+
// infrastructure to be ready.
200+
WaitingForClusterInfrastructureReadyV1Beta2Reason = "WaitingForClusterInfrastructureReady"
201+
202+
// WaitingForControlPlaneInitializedV1Beta2Reason documents an infra Machine waiting
203+
// for the control plane to be initialized.
204+
WaitingForControlPlaneInitializedV1Beta2Reason = "WaitingForControlPlaneInitialized"
205+
206+
// WaitingForBootstrapDataV1Beta2Reason documents an infra Machine waiting for the bootstrap
207+
// data to be ready before starting to create the Machine's infrastructure.
208+
WaitingForBootstrapDataV1Beta2Reason = "WaitingForBootstrapData"
209+
210+
// ProvisionedV1Beta2Reason documents an object or a piece of infrastructure being provisioned.
211+
ProvisionedV1Beta2Reason = "Provisioned"
201212
)

test/infrastructure/docker/api/v1beta1/devmachine_types.go

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,122 @@ const (
6666
APIServerWaitingForStartupTimeoutReason = "WaitingForStartupTimeout"
6767
)
6868

69+
// DevMachine's v1Beta2 conditions that apply to all the supported backends.
70+
71+
// DevMachine's Ready condition and corresponding reasons that will be used in v1Beta2 API version.
72+
const (
73+
// DevMachineReadyV1Beta2Condition is true if the DevMachine's VMProvisioned, NodeProvisioned,
74+
// EtcdProvisioned (if present) and APIServerProvisioned (if present) conditions are true.
75+
DevMachineReadyV1Beta2Condition = clusterv1.ReadyV1Beta2Condition
76+
77+
// DevMachineReadyV1Beta2Reason surfaces when the DevMachine readiness criteria is met.
78+
DevMachineReadyV1Beta2Reason = clusterv1.ReadyV1Beta2Reason
79+
80+
// DevMachineNotReadyV1Beta2Reason surfaces when the DevMachine readiness criteria is not met.
81+
DevMachineNotReadyV1Beta2Reason = clusterv1.NotReadyV1Beta2Reason
82+
83+
// DevMachineReadyUnknownV1Beta2Reason surfaces when at least one DevMachine readiness criteria is unknown
84+
// and no DevMachine readiness criteria is not met.
85+
DevMachineReadyUnknownV1Beta2Reason = clusterv1.ReadyUnknownV1Beta2Reason
86+
)
87+
88+
// DevMachine's v1Beta2 conditions that apply to the in memory backend.
89+
90+
// VirtualMachineProvisioned condition and corresponding reasons that will be used in v1Beta2 API version for a DevMachine's in memory backend.
91+
const (
92+
// DevMachineInMemoryVMProvisionedV1Beta2Condition documents the status of the provisioning of a fake VM for a DevMachine's in memory backend.
93+
DevMachineInMemoryVMProvisionedV1Beta2Condition string = "VMProvisioned"
94+
95+
// DevMachineInMemoryVMWaitingForClusterInfrastructureV1Beta2Reason documents a fake VM for a DevMachine's in memory backend waiting for the cluster
96+
// infrastructure to be ready.
97+
DevMachineInMemoryVMWaitingForClusterInfrastructureV1Beta2Reason = clusterv1.WaitingForClusterInfrastructureReadyV1Beta2Reason
98+
99+
// DevMachineInMemoryVMWaitingForControlPlaneInitializedV1Beta2Reason documents a fake VM for a DevMachine's in memory backend waiting
100+
// for the control plane to be initialized.
101+
DevMachineInMemoryVMWaitingForControlPlaneInitializedV1Beta2Reason = clusterv1.WaitingForControlPlaneInitializedV1Beta2Reason
102+
103+
// DevMachineInMemoryVMWaitingForBootstrapDataV1Beta2Reason documents a fake VM for a DevMachine's in memory backend waiting for the bootstrap
104+
// data to be ready.
105+
DevMachineInMemoryVMWaitingForBootstrapDataV1Beta2Reason = clusterv1.WaitingForBootstrapDataV1Beta2Reason
106+
107+
// DevMachineInMemoryVMWaitingForStartupTimeoutV1Beta2Reason documents when the infrastructure for a fake VM for a DevMachine's in memory backend
108+
// is provisioning (it waits for a startup timeout).
109+
DevMachineInMemoryVMWaitingForStartupTimeoutV1Beta2Reason = "WaitingForStartupTimeout"
110+
111+
// DevMachineInMemoryVMProvisionedV1Beta2Reason documents when a fake VM for a DevMachine's in memory backend is fully provisioned.
112+
DevMachineInMemoryVMProvisionedV1Beta2Reason = clusterv1.ProvisionedV1Beta2Reason
113+
114+
// DevMachineInMemoryVMInternalErrorV1Beta2Reason surfaces unexpected error when reconciling a fake VM for a DevMachine's in memory backend.
115+
DevMachineInMemoryVMInternalErrorV1Beta2Reason = clusterv1.InternalErrorV1Beta2Reason
116+
)
117+
118+
// NodeProvisioned condition and corresponding reasons that will be used in v1Beta2 API version for a DevMachine's in memory backend.
119+
const (
120+
// DevMachineInMemoryNodeProvisionedV1Beta2Condition documents the status of the provisioning of the node hosted on the DevMachine's in memory backend.
121+
DevMachineInMemoryNodeProvisionedV1Beta2Condition string = "NodeProvisioned"
122+
123+
// DevMachineInMemoryNodeWaitingForVMProvisionedV1Beta2Reason documents a fake Node for a DevMachine's in memory backend waiting for the VM
124+
// to be provisioned.
125+
DevMachineInMemoryNodeWaitingForVMProvisionedV1Beta2Reason = "WaitingForVMProvisioned"
126+
127+
// DevMachineInMemoryNodeWaitingForStartupTimeoutV1Beta2Reason documents when the fake Node for a DevMachine's in memory backend
128+
// is provisioning (it waits for a startup timeout).
129+
DevMachineInMemoryNodeWaitingForStartupTimeoutV1Beta2Reason = "WaitingForStartupTimeout"
130+
131+
// DevMachineInMemoryNodeProvisionedV1Beta2Reason documents when a fake Node for a DevMachine's in memory backend is fully provisioned.
132+
DevMachineInMemoryNodeProvisionedV1Beta2Reason = clusterv1.ProvisionedV1Beta2Reason
133+
134+
// DevMachineInMemoryNodeInternalErrorV1Beta2Reason surfaces unexpected error when reconciling a fake Node for a DevMachine's in memory backend.
135+
DevMachineInMemoryNodeInternalErrorV1Beta2Reason = clusterv1.InternalErrorV1Beta2Reason
136+
)
137+
138+
// EtcdProvisioned condition and corresponding reasons that will be used in v1Beta2 API version for a DevMachine's in memory backend.
139+
const (
140+
// DevMachineInMemoryEtcdProvisionedV1Beta2Condition documents the status of the etcd instance hosted on the DevMachine's in memory backend.
141+
DevMachineInMemoryEtcdProvisionedV1Beta2Condition string = "EtcdProvisioned"
142+
143+
// DevMachineInMemoryEtcdWaitingForVMProvisionedV1Beta2Reason documents a fake Etcd for a DevMachine's in memory backend waiting for the VM
144+
// to be provisioned.
145+
DevMachineInMemoryEtcdWaitingForVMProvisionedV1Beta2Reason = "WaitingForVMProvisioned"
146+
147+
// DevMachineInMemoryEtcdWaitingForNodeProvisionedV1Beta2Reason documents a fake Etcd for a DevMachine's in memory backend waiting for the Node
148+
// to be provisioned.
149+
DevMachineInMemoryEtcdWaitingForNodeProvisionedV1Beta2Reason = "WaitingForNodeProvisioned"
150+
151+
// DevMachineInMemoryEtcdWaitingForStartupTimeoutV1Beta2Reason documents when the fake Etcd for a DevMachine's in memory backend
152+
// is provisioning (it waits for a startup timeout).
153+
DevMachineInMemoryEtcdWaitingForStartupTimeoutV1Beta2Reason = "WaitingForStartupTimeout"
154+
155+
// DevMachineInMemoryEtcdProvisionedV1Beta2Reason documents when a fake Etcd for a DevMachine's in memory backend is fully provisioned.
156+
DevMachineInMemoryEtcdProvisionedV1Beta2Reason = clusterv1.ProvisionedV1Beta2Reason
157+
158+
// DevMachineInMemoryEtcdInternalErrorV1Beta2Reason surfaces unexpected error when reconciling a fake Etcd for a DevMachine's in memory backend.
159+
DevMachineInMemoryEtcdInternalErrorV1Beta2Reason = clusterv1.InternalErrorV1Beta2Reason
160+
)
161+
162+
// APIServerProvisioned condition and corresponding reasons that will be used in v1Beta2 API version for a DevMachine's in memory backend.
163+
const (
164+
// DevMachineInMemoryAPIServerProvisionedV1Beta2Condition documents the status of the provisioning of the APIServer instance hosted on the DevMachine's in memory backend.
165+
DevMachineInMemoryAPIServerProvisionedV1Beta2Condition string = "APIServerProvisioned"
166+
167+
// DevMachineInMemoryAPIServerWaitingForVMProvisionedV1Beta2Reason documents a fake APIServer for a DevMachine's in memory backend waiting for the VM
168+
// to be provisioned.
169+
DevMachineInMemoryAPIServerWaitingForVMProvisionedV1Beta2Reason = "WaitingForVMProvisioned"
170+
171+
// DevMachineInMemoryAPIServerWaitingForNodeProvisionedV1Beta2Reason documents a fake APIServer for a DevMachine's in memory backend waiting for the Node
172+
// to be provisioned.
173+
DevMachineInMemoryAPIServerWaitingForNodeProvisionedV1Beta2Reason = "WaitingForNodeProvisioned"
174+
175+
// DevMachineInMemoryAPIServerWaitingForStartupTimeoutV1Beta2Reason documents when the infrastructure for a fake APIServer for a DevMachine's in memory backend provisioning.
176+
DevMachineInMemoryAPIServerWaitingForStartupTimeoutV1Beta2Reason = "WaitingForStartupTimeout"
177+
178+
// DevMachineInMemoryAPIServerProvisionedV1Beta2Reason documents when a fake APIServer for a DevMachine's in memory backend is fully provisioned.
179+
DevMachineInMemoryAPIServerProvisionedV1Beta2Reason = clusterv1.ProvisionedV1Beta2Reason
180+
181+
// DevMachineInMemoryAPIServerInternalErrorV1Beta2Reason surfaces unexpected error when reconciling a fake APIServer for a DevMachine's in memory backend.
182+
DevMachineInMemoryAPIServerInternalErrorV1Beta2Reason = clusterv1.InternalErrorV1Beta2Reason
183+
)
184+
69185
// DevMachineSpec defines the desired state of DevMachine.
70186
type DevMachineSpec struct {
71187
// providerID used to link this machine with the node hosted on it.

0 commit comments

Comments
 (0)