Bugfix prevent daemon controller to adopt controller revisions of other namespaces

This commit is contained in:
evertrain
2021-11-01 17:36:15 +08:00
parent 37efc5feec
commit 9ceb226c06
5 changed files with 132 additions and 12 deletions

View File

@@ -406,7 +406,7 @@ func (dsc *DaemonSetsController) controlledHistories(ctx context.Context, ds *ap
// List all histories to include those that don't match the selector anymore
// but have a ControllerRef pointing to the controller.
histories, err := dsc.historyLister.List(labels.Everything())
histories, err := dsc.historyLister.ControllerRevisions(ds.Namespace).List(labels.Everything())
if err != nil {
return nil, err
}