1
0
Fork 0
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:
Shuting Zhao 2019-11-13 13:01:08 -08:00
parent d162f52714
commit 670d665aed
2 changed files with 0 additions and 15 deletions

1
.gitignore vendored
View file

@ -4,4 +4,3 @@ Gopkg.lock
gh-pages/public
_output
coverage.txt
kyverno

View file

@ -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)