Skip to content

Commit

Permalink
fix changed types func
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
  • Loading branch information
jakubdyszkiewicz committed Apr 8, 2024
1 parent f10ba04 commit 780419d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kds/v2/reconcile/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ func (r *reconciler) Reconcile(ctx context.Context, node *envoy_core.Node, chang
func (r *reconciler) changedTypes(old, new envoy_cache.ResourceSnapshot) []core_model.ResourceType {
var changed []core_model.ResourceType
for _, typ := range util_kds_v2.GetSupportedTypes() {
if old == nil || !maps.Equal(old.GetVersionMap(typ), new.GetVersionMap(typ)) {
if (old == nil && len(new.GetVersionMap(typ)) > 0) ||
(old != nil && !maps.Equal(old.GetVersionMap(typ), new.GetVersionMap(typ))) {
changed = append(changed, core_model.ResourceType(typ))
break
}
}
return changed
Expand Down

0 comments on commit 780419d

Please sign in to comment.