@@ -64,7 +64,8 @@ func (f *cFactory) SyncOrchestratorStatus(ctx context.Context) error {
6464 r .Id , err ,
6565 )
6666 }
67- f .rec .Event (f .cluster , "RecoveryAcked" , "acked" , fmt .Sprintf ("Recovery with id %d was acked." , r .Id ))
67+ f .rec .Event (f .cluster , core .EventTypeNormal , "RecoveryAcked" ,
68+ fmt .Sprintf ("Recovery with id %d was acked." , r .Id ))
6869 }
6970 }
7071
@@ -211,19 +212,19 @@ func (f *cFactory) updateNodeCondition(host string, cType api.NodeConditionType,
211212 switch cType {
212213 case api .NodeConditionMaster :
213214 if status == core .ConditionTrue {
214- f .rec .Event (pod , "PromoteMaster" , "orc " , "" )
215+ f .rec .Event (pod , core . EventTypeWarning , "PromoteMaster " , "Promoted as master by orchestrator " )
215216 } else if status == core .ConditionFalse {
216- f .rec .Event (pod , "DemoteMaster" , "orc " , "" )
217+ f .rec .Event (pod , core . EventTypeWarning , "DemoteMaster " , "Demoted as master by orchestrator " )
217218 }
218219 case api .NodeConditionLagged :
219220 if status == core .ConditionTrue {
220- f .rec .Event (pod , "LagDetected" , "orc " , "" )
221+ f .rec .Event (pod , core . EventTypeNormal , "LagDetected " , "This node has lag. Lag was detected. " )
221222 }
222223 case api .NodeConditionReplicating :
223224 if status == core .ConditionTrue {
224- f .rec .Event (pod , "ReplicationRunning" , "orc " , "" )
225+ f .rec .Event (pod , core . EventTypeNormal , "ReplicationRunning " , "Replication is running " )
225226 } else if status == core .ConditionFalse {
226- f .rec .Event (pod , "ReplicationStopped" , "orc " , "" )
227+ f .rec .Event (pod , core . EventTypeWarning , "ReplicationStopped " , "Replication is stopped " )
227228 }
228229 }
229230}
0 commit comments