Deployments to work with specific namespaces instead of all namespaces (#2635)

* remove namespaceAll in deployments
* remove GetNamespace function from informer
* added logger and improvement for naming
* move reaper logic to utils

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Shubham Bansal
2022-11-29 17:09:51 +05:30
committed by GitHub
co-authored by Sanket Sudake
parent 0aec9e139e
commit 526b5f0beb
11 changed files with 366 additions and 241 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ func (pruner *ArchivePruner) getOrphanArchives(ctx context.Context) {
var archiveID string
// get all pkgs from kubernetes
for _, namespace := range utils.GetNamespaces() {
for _, namespace := range utils.DefaultNSResolver().FissionResourceNS {
pkgList, err := pruner.crdClient.CoreV1().Packages(namespace).List(ctx, metav1.ListOptions{})
if err != nil {
pruner.logger.Error("error getting package list from kubernetes", zap.Error(err))