Skip to content

Commit

Permalink
Merge pull request #160 from thetechnick/hotfix-reconcile-loop
Browse files Browse the repository at this point in the history
Fix reconcile loop, due to fighting with OLM about namespace labels
  • Loading branch information
openshift-merge-robot authored Mar 11, 2022
2 parents 3bf5dbb + fa1ed4c commit 6a124f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/controllers/addon/phase_ensure_wanted_namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ func reconcileNamespace(ctx context.Context, c client.Client,
return nil, controllers.ErrNotOwnedByUs
}

for k, v := range namespace.Labels {
currentNamespace.Labels[k] = v
}
currentNamespace.OwnerReferences = namespace.OwnerReferences
currentNamespace.Labels = namespace.Labels

return currentNamespace, c.Update(ctx, currentNamespace)
}

0 comments on commit 6a124f7

Please sign in to comment.