List fission resources in specific namespace instead of all namespace (#2604)

This commit is contained in:
Shubham Bansal
2022-11-08 10:25:09 +05:30
committed by GitHub
parent b71a36dc1c
commit 32bd874ab6
9 changed files with 218 additions and 203 deletions
+5
View File
@@ -93,6 +93,7 @@ func CleanupDeployments(ctx context.Context, logger *zap.Logger, client kubernet
// ignore err
}
}
return nil
}
@@ -120,6 +121,7 @@ func CleanupPods(ctx context.Context, logger *zap.Logger, client kubernetes.Inte
// ignore err
}
}
return nil
}
@@ -147,6 +149,7 @@ func CleanupServices(ctx context.Context, logger *zap.Logger, client kubernetes.
// ignore err
}
}
return nil
}
@@ -175,6 +178,7 @@ func CleanupHpa(ctx context.Context, logger *zap.Logger, client kubernetes.Inter
// ignore err
}
}
return nil
}
@@ -186,6 +190,7 @@ func CleanupRoleBindings(ctx context.Context, logger *zap.Logger, client kuberne
time.Sleep(cleanupRoleBindingInterval)
logger.Debug("starting cleanupRoleBindings cycle")
// get all rolebindings ( just to be efficient, one call to kubernetes )
rbList, err := client.RbacV1().RoleBindings(metav1.NamespaceAll).List(ctx, metav1.ListOptions{})
if err != nil {