Skip to content

Commit

Permalink
issue fixed (#1558)
Browse files Browse the repository at this point in the history
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
  • Loading branch information
NoSkillGirl committed Feb 8, 2021
1 parent 72eb5e3 commit c148573
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/engine/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
9 changes: 0 additions & 9 deletions pkg/generate/generate_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -134,9 +128,6 @@ func NewController(
UpdateFunc: c.updateGenericResource,
})

// c.nsLister = namespaces.Lister()
// c.nsListerSynced = namespaces.Informer().HasSynced

return &c, nil
}

Expand Down

0 comments on commit c148573

Please sign in to comment.