mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 07:26:55 +00:00
cleanup unused code
This commit is contained in:
parent
d162f52714
commit
670d665aed
2 changed files with 0 additions and 15 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,4 +4,3 @@ Gopkg.lock
|
|||
gh-pages/public
|
||||
_output
|
||||
coverage.txt
|
||||
kyverno
|
||||
|
|
|
@ -53,7 +53,6 @@ type ClusterPolicyViolationListerExpansion interface {
|
|||
// NamespacedPolicyViolationListerExpansion allows custom methods to be added to
|
||||
// NamespacedPolicyViolationLister.
|
||||
type NamespacedPolicyViolationListerExpansion interface {
|
||||
// ListResources(selector labels.Selector) (ret []*v1alpha1.NamespacedPolicyViolation, err error)
|
||||
}
|
||||
|
||||
// NamespacedPolicyViolationNamespaceListerExpansion allows custom methods to be added to
|
||||
|
@ -81,19 +80,6 @@ func (pl *clusterPolicyLister) ListResources(selector labels.Selector) (ret []*v
|
|||
return policies, err
|
||||
}
|
||||
|
||||
// func (namespacepvl *namespacedPolicyViolationLister) ListResources(selector labels.Selector) (ret []*kyverno.NamespacedPolicyViolation, err error) {
|
||||
// namespacepvs, err := namespacepvl.List(selector)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
|
||||
// for index := range namespacepvs {
|
||||
// namespacepvs[index].SetGroupVersionKind(kyverno.SchemeGroupVersion.WithKind("NamespacedPolicyViolation"))
|
||||
// }
|
||||
|
||||
// return namespacepvs, nil
|
||||
// }
|
||||
|
||||
func (pl *clusterPolicyLister) GetPolicyForPolicyViolation(pv *kyverno.ClusterPolicyViolation) ([]*kyverno.ClusterPolicy, error) {
|
||||
if len(pv.Labels) == 0 {
|
||||
return nil, fmt.Errorf("no Policy found for PolicyViolation %v because it has no labels", pv.Name)
|
||||
|
|
Loading…
Add table
Reference in a new issue