@@ -45,11 +45,11 @@ func createBackupInProgressConditionPlan(ctx context.Context,
4545
4646 currentCondition , currentConditionExists := status .Conditions .Get (api .ConditionTypeBackupInProgress )
4747
48- backupInProgress := cache .Target .HotBackup .Create
48+ maintenance := cache .Target .HotBackup .Create
4949
5050 if currentConditionExists {
5151 // Condition exists
52- if ! backupInProgress .Exists () {
52+ if ! maintenance .Exists () {
5353 // Condition needs to be removed
5454 return api.Plan {
5555 removeConditionActionV2 ("Backup not in progress" , api .ConditionTypeBackupInProgress ),
@@ -58,7 +58,7 @@ func createBackupInProgressConditionPlan(ctx context.Context,
5858
5959 // Backup is in progress
6060
61- hash := backupInProgress .Hash ()
61+ hash := maintenance .Hash ()
6262
6363 if ! currentCondition .IsTrue () || currentCondition .Hash != hash {
6464 return api.Plan {
@@ -68,9 +68,9 @@ func createBackupInProgressConditionPlan(ctx context.Context,
6868
6969 return nil
7070 } else {
71- if backupInProgress .Exists () {
71+ if maintenance .Exists () {
7272 return api.Plan {
73- updateConditionActionV2 ("Backup in progress" , api .ConditionTypeBackupInProgress , true , "Backup In Progress" , "" , backupInProgress .Hash ()),
73+ updateConditionActionV2 ("Backup in progress" , api .ConditionTypeBackupInProgress , true , "Backup In Progress" , "" , maintenance .Hash ()),
7474 }
7575 }
7676
@@ -94,32 +94,32 @@ func createMaintenanceConditionPlan(ctx context.Context,
9494
9595 currentCondition , currentConditionExists := status .Conditions .Get (api .ConditionTypeMaintenance )
9696
97- backupInProgress := cache .Target . HotBackup . Create
97+ maintenance := cache .Supervision . Maintenance
9898
9999 if currentConditionExists {
100100 // Condition exists
101- if ! backupInProgress .Exists () {
101+ if ! maintenance .Exists () {
102102 // Condition needs to be removed
103103 return api.Plan {
104- removeConditionActionV2 ("Backup not in progress " , api .ConditionTypeMaintenance ),
104+ removeConditionActionV2 ("Maintenance Disabled " , api .ConditionTypeMaintenance ),
105105 }
106106 }
107107
108108 // Backup is in progress
109109
110- hash := backupInProgress .Hash ()
110+ hash := maintenance .Hash ()
111111
112112 if ! currentCondition .IsTrue () || currentCondition .Hash != hash {
113113 return api.Plan {
114- updateConditionActionV2 ("Backup in progress " , api .ConditionTypeMaintenance , true , "Backup In Progress " , "" , hash ),
114+ updateConditionActionV2 ("Maintenance Enabled " , api .ConditionTypeMaintenance , true , "Maintenance Enabled " , "" , hash ),
115115 }
116116 }
117117
118118 return nil
119119 } else {
120- if backupInProgress .Exists () {
120+ if maintenance .Exists () {
121121 return api.Plan {
122- updateConditionActionV2 ("Backup in progress " , api .ConditionTypeMaintenance , true , "Backup In Progress " , "" , backupInProgress .Hash ()),
122+ updateConditionActionV2 ("Maintenance Enabled " , api .ConditionTypeMaintenance , true , "Maintenance Enabled " , "" , maintenance .Hash ()),
123123 }
124124 }
125125
0 commit comments