Skip to content

Commit 215d8c5

Browse files
authored
check if the namespace is terminating (#46)
1 parent 19cb2bb commit 215d8c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/namespacescope_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,10 @@ func (r *NamespaceScopeReconciler) getValidatedNamespaces(instance *operatorv1.N
683683
return nil, err
684684
}
685685
}
686+
if ns.Status.Phase == corev1.NamespaceTerminating {
687+
klog.Infof("Namespace %s is terminating. Ignore this namespace ", nsMem)
688+
continue
689+
}
686690
validatedNs = append(validatedNs, nsMem)
687691
}
688692
return validatedNs, nil

0 commit comments

Comments
 (0)