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:
parent
72eb5e3503
commit
c148573d48
2 changed files with 1 additions and 10 deletions
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue