fix: deployment/cronjob namespace filtering (#290)

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
Matthis
2023-04-17 17:37:19 +02:00
committed by GitHub
parent af8b350520
commit 3d684a2af7
10 changed files with 454 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ func (d DeploymentAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)
"analyzer_name": kind,
})
deployments, err := a.Client.GetClient().AppsV1().Deployments("").List(context.Background(), v1.ListOptions{})
deployments, err := a.Client.GetClient().AppsV1().Deployments(a.Namespace).List(context.Background(), v1.ListOptions{})
if err != nil {
return nil, err
}