Summary
Add v1beta2 conditions to HCloudMachine on v1.1.x while keeping the existing v1beta1 conditions unchanged.
What would you like to add
HCloudMachine is a primary infrastructure object that manages a real Hetzner Cloud server.
Today the machine lifecycle is surfaced through v1beta1 conditions such as:
| Condition |
Purpose |
HCloudTokenAvailable |
Hetzner API credentials are valid and reachable |
BootstrapReady |
Bootstrap data has been provided by CAPI |
ServerCreateSucceeded |
Server was successfully created in HCloud |
ServerAvailable |
Server is running and usable |
HetznerAPIReachable |
The controller is not blocked by HCloud rate limiting |
These conditions are still needed and must keep their current behavior. At the same time, the CAPI v1beta2 transition requires HCloudMachine to expose v1beta2 conditions in parallel.
Deletion also needs to be visible more clearly. Today it is mostly inferred from metadata.deletionTimestamp, finalizers, and legacy ServerAvailable=False transitions. We want a dedicated v1beta2 Deleting condition for HCloudMachine.
The Solution
Follow the same structure CAPV used:
- Add
status.v1beta2.conditions to HCloudMachine.
- Keep writing the existing v1beta1 conditions exactly as today.
- Add direct
v1beta2conditions.Set(...) calls in the same controller and service code paths that already set the v1beta1 conditions.
- Add a controller local patch step for
HCloudMachine that computes:
- the legacy v1beta1 summary
- the v1beta2
Ready summary
- the owned v1beta2 condition set for patching
- Add a dedicated v1beta2
Deleting condition.
This keeps the behavior explicit at each reconcile decision point and avoids a second translation layer that can drift from the real lifecycle logic.
Final Conditions
The final v1beta2 conditions added for HCloudMachine are:
| Constant |
Type |
Polarity |
Notes |
HCloudMachineReadyV1Beta2Condition |
clusterv1.ReadyV1Beta2Condition |
Positive |
Summary condition |
HCloudMachineHCloudTokenAvailableV1Beta2Condition |
HCloudTokenAvailable |
Positive |
True when HCloud credentials are valid and reachable |
HCloudMachineBootstrapReadyV1Beta2Condition |
BootstrapReady |
Positive |
True when bootstrap data is available |
HCloudMachineServerCreatedV1Beta2Condition |
ServerCreated |
Positive |
True when the HCloud server has been provisioned |
HCloudMachineServerAvailableV1Beta2Condition |
ServerAvailable |
Positive |
True when the server is running and usable |
HCloudMachineDeletingV1Beta2Condition |
clusterv1.DeletingV1Beta2Condition |
Negative |
Dedicated deletion signal for HCloudMachine |
HCloudMachineHCloudRateLimitExceededV1Beta2Condition |
HCloudRateLimitExceeded |
Negative |
True when HCloud API rate limit has been exceeded. Set to False on every successful reconcile (happy path setter). |
Summary
Add v1beta2 conditions to
HCloudMachineonv1.1.xwhile keeping the existing v1beta1 conditions unchanged.v1.1.xWhat would you like to add
HCloudMachineis a primary infrastructure object that manages a real Hetzner Cloud server.Today the machine lifecycle is surfaced through v1beta1 conditions such as:
HCloudTokenAvailableBootstrapReadyServerCreateSucceededServerAvailableHetznerAPIReachableThese conditions are still needed and must keep their current behavior. At the same time, the CAPI v1beta2 transition requires
HCloudMachineto expose v1beta2 conditions in parallel.Deletion also needs to be visible more clearly. Today it is mostly inferred from
metadata.deletionTimestamp, finalizers, and legacyServerAvailable=Falsetransitions. We want a dedicated v1beta2Deletingcondition forHCloudMachine.The Solution
Follow the same structure CAPV used:
status.v1beta2.conditionstoHCloudMachine.v1beta2conditions.Set(...)calls in the same controller and service code paths that already set the v1beta1 conditions.HCloudMachinethat computes:ReadysummaryDeletingcondition.This keeps the behavior explicit at each reconcile decision point and avoids a second translation layer that can drift from the real lifecycle logic.
Final Conditions
The final v1beta2 conditions added for
HCloudMachineare:HCloudMachineReadyV1Beta2Conditionclusterv1.ReadyV1Beta2ConditionHCloudMachineHCloudTokenAvailableV1Beta2ConditionHCloudTokenAvailableHCloudMachineBootstrapReadyV1Beta2ConditionBootstrapReadyHCloudMachineServerCreatedV1Beta2ConditionServerCreatedHCloudMachineServerAvailableV1Beta2ConditionServerAvailableHCloudMachineDeletingV1Beta2Conditionclusterv1.DeletingV1Beta2ConditionHCloudMachineHCloudMachineHCloudRateLimitExceededV1Beta2ConditionHCloudRateLimitExceeded