newdeploy executor to work with specific namespaces (#2590)
This commit is contained in:
@@ -778,15 +778,17 @@ func (deploy *NewDeploy) idleObjectReaper(ctx context.Context) {
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) doIdleObjectReaper(ctx context.Context) {
|
||||
envs, err := deploy.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(ctx, metav1.ListOptions{})
|
||||
envList := make(map[k8sTypes.UID]struct{})
|
||||
for _, namespace := range utils.GetNamespaces() {
|
||||
envs, err := deploy.fissionClient.CoreV1().Environments(namespace).List(ctx, metav1.ListOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Fatal("failed to get environment list", zap.Error(err))
|
||||
deploy.logger.Fatal("failed to get environment list", zap.Error(err), zap.String("namespace", namespace))
|
||||
}
|
||||
|
||||
envList := make(map[k8sTypes.UID]struct{})
|
||||
for _, env := range envs.Items {
|
||||
envList[env.ObjectMeta.UID] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
funcSvcs, err := deploy.fsCache.ListOld(time.Second * 5)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user