Skip to content

Commit

Permalink
BUG/MINOR: service: do not override service status
Browse files Browse the repository at this point in the history
in case old service status is ADDED, then newly added event should not change status, but only update data.

ADDED and MODIFIED status are cleared if transaction is successfully completed
  • Loading branch information
oktalz committed Sep 13, 2022
1 parent cf68a3b commit eb3e848
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/store/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func (k *K8s) EventService(ns *Namespace, data *Service) (updateRequired bool) {
if oldService.Equal(newService) {
return updateRequired
}
if oldService.Status == ADDED {
newService.Status = ADDED
}
ns.Services[data.Name] = newService
updateRequired = true
case ADDED:
Expand Down

0 comments on commit eb3e848

Please sign in to comment.