1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

issue fixed (#1558)

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
This commit is contained in:
Pooja Singh 2021-02-09 00:06:39 +05:30 committed by GitHub
parent 72eb5e3503
commit c148573d48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 10 deletions

View file

@ -146,7 +146,7 @@ func doesResourceMatchConditionBlock(conditionBlock kyverno.ResourceDescription,
}
}
if conditionBlock.NamespaceSelector != nil && namespaceLabels != nil && resource.GetKind() != "Namespace" && resource.GetKind() != "" {
if conditionBlock.NamespaceSelector != nil && resource.GetKind() != "Namespace" && resource.GetKind() != "" {
hasPassed, err := checkSelector(conditionBlock.NamespaceSelector, namespaceLabels)
if err != nil {
errs = append(errs, fmt.Errorf("failed to parse namespace selector: %v", err))

View file

@ -60,12 +60,6 @@ type Controller struct {
// dynamic shared informer factory
dynamicInformer dynamicinformer.DynamicSharedInformerFactory
// // nsLister can list/get namespaces from the shared informer's store
// nsLister listerv1.NamespaceLister
// // nsListerSynced returns true if the namespace store has been synced at least once
// nsListerSynced cache.InformerSynced
//TODO: list of generic informers
// only support Namespaces for re-evaluation on resource updates
nsInformer informers.GenericInformer
@ -134,9 +128,6 @@ func NewController(
UpdateFunc: c.updateGenericResource,
})
// c.nsLister = namespaces.Lister()
// c.nsListerSynced = namespaces.Informer().HasSynced
return &c, nil
}