Skip to content

Commit

Permalink
fix double writes
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
  • Loading branch information
jakubdyszkiewicz committed Dec 4, 2023
1 parent 670bd57 commit 164cceb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/core/managers/apis/dataplane/dataplane_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ func (m *dataplaneManager) setHealth(dp *core_mesh.DataplaneResource) {
for _, inbound := range dp.Spec.Networking.Inbound {
if inbound.ServiceProbe != nil {
inbound.State = mesh_proto.Dataplane_Networking_Inbound_NOT_READY
// write health for backwards compatibility with Kuma 2.5 and older
inbound.Health = &mesh_proto.Dataplane_Networking_Inbound_Health{
Ready: false,
}
}
}
}
2 changes: 1 addition & 1 deletion pkg/hds/tracker/callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (t *tracker) updateDataplane(streamID xds.StreamID, healthMap map[uint32]bo
inbound.Health = &mesh_proto.Dataplane_Networking_Inbound_Health{
Ready: false,
}
changed = false
changed = true
}
}

Expand Down

0 comments on commit 164cceb

Please sign in to comment.