Skip to content

Commit

Permalink
fix: service label sync problems (#2353)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm authored Dec 19, 2024
1 parent 5933283 commit ecc7bcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/resources/services/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (s *serviceSyncer) Sync(ctx *synccontext.SyncContext, event *synccontext.Sy

// translate selector
// TODO: ryan - convert to bidirectional
if !apiequality.Semantic.DeepEqual(event.VirtualOld.Spec.Selector, event.Virtual.Spec.Selector) {
if !apiequality.Semantic.DeepEqual(event.VirtualOld.Spec.Selector, event.Virtual.Spec.Selector) || apiequality.Semantic.DeepEqual(event.HostOld.Spec.Selector, event.Host.Spec.Selector) {
event.Host.Spec.Selector = translate.HostLabelsMap(event.Virtual.Spec.Selector, event.Host.Spec.Selector, event.Virtual.Namespace, false)
} else {
event.Virtual.Spec.Selector = translate.VirtualLabelsMap(event.Host.Spec.Selector, event.Virtual.Spec.Selector)
Expand Down

0 comments on commit ecc7bcf

Please sign in to comment.