@@ -26,34 +26,34 @@ import (
2626type MachinePhase string
2727
2828const (
29- MachineConditionTypeMachineReady kmapi.ConditionType = "MachineReady"
30- MachineConditionTypeScriptReady kmapi.ConditionType = "ScriptReady"
31- MachineConditionTypeAuthDataReady kmapi.ConditionType = "AuthDataReady"
32- MachineConditionTypeClusterReady kmapi.ConditionType = "ClusterReady "
29+ MachineConditionTypeMachineReady kmapi.ConditionType = "MachineReady"
30+ MachineConditionTypeScriptReady kmapi.ConditionType = "ScriptReady"
31+ MachineConditionTypeAuthDataReady kmapi.ConditionType = "AuthDataReady"
32+ MachineConditionTypeScriptComplete kmapi.ConditionType = "ScriptComplete "
3333)
3434
3535const (
36- MachineConditionClusterCreatedSuccessfully = "ClusterCreatedSuccessfully "
37- MachineConditionClusterCreateFailed = "ClusterCreateFailed "
36+ MachineConditionClusterOperationSuccessful = "ClusterOperationSuccessful "
37+ MachineConditionClusterOperationFailed = "ClusterOperationFailed "
3838 MachineConditionWaitingForScriptCompletion = "WaitingForScriptCompletion"
3939 MachineConditionAuthDataNotFound = "AuthDataNotFound"
4040 MachineConditionScriptDataNotFound = "ScriptDataNotFound"
4141 MachineConditionMachineCreating = "MachineCreating"
4242)
4343
4444const (
45- MachinePhasePending MachinePhase = "Pending"
46- MachinePhaseInProgress MachinePhase = "InProgress"
47- MachinePhaseWaitingForClusterReady MachinePhase = "WaitingForClusterReady "
48- MachinePhaseClusterCreateFailed MachinePhase = "ClusterCreateFailed "
49- MachinePhaseSuccess MachinePhase = "Success"
50- MachinePhaseTerminating MachinePhase = "Terminating"
51- MachinePhaseFailed MachinePhase = "Failed"
45+ MachinePhasePending MachinePhase = "Pending"
46+ MachinePhaseInProgress MachinePhase = "InProgress"
47+ MachinePhaseWaitingForScriptCompletion MachinePhase = "WaitingForScriptCompletion "
48+ MachinePhaseClusterOperationFailed MachinePhase = "ClusterOperationFailed "
49+ MachinePhaseSuccess MachinePhase = "Success"
50+ MachinePhaseTerminating MachinePhase = "Terminating"
51+ MachinePhaseFailed MachinePhase = "Failed"
5252)
5353
5454func ConditionsOrder () []kmapi.ConditionType {
5555 return []kmapi.ConditionType {
56- MachineConditionTypeClusterReady ,
56+ MachineConditionTypeScriptComplete ,
5757 MachineConditionTypeMachineReady ,
5858 MachineConditionTypeAuthDataReady ,
5959 MachineConditionTypeScriptReady ,
@@ -92,10 +92,10 @@ func GetPhase(obj *Machine) MachinePhase {
9292 return MachinePhaseInProgress
9393 }
9494 if cond .Reason == MachineConditionWaitingForScriptCompletion {
95- return MachinePhaseWaitingForClusterReady
95+ return MachinePhaseWaitingForScriptCompletion
9696 }
97- if cond .Reason == MachineConditionClusterCreateFailed {
98- return MachineConditionClusterCreateFailed
97+ if cond .Reason == MachineConditionClusterOperationFailed {
98+ return MachineConditionClusterOperationFailed
9999 }
100100 return MachinePhaseFailed
101101}
0 commit comments