Skip to content

Commit 04ea847

Browse files
ArnobKumarSahatamalsaha
authored andcommitted
OffshootSelectors()
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
1 parent d7f4749 commit 04ea847

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/billing_event.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (p *BillingEventCreator) CreateEvent(obj client.Object) (*api.Event, error)
5050
if p.ClientBilling {
5151
if r, ok := obj.(Resource); ok {
5252
var podList core.PodList
53-
err = p.PodLister.List(context.TODO(), &podList, client.InNamespace(obj.GetNamespace()), client.MatchingLabels(r.OffshootLabels()))
53+
err = p.PodLister.List(context.TODO(), &podList, client.InNamespace(obj.GetNamespace()), client.MatchingLabels(r.OffshootSelectors()))
5454
if err != nil {
5555
return nil, err
5656
}
@@ -82,7 +82,7 @@ func (p *BillingEventCreator) CreateEvent(obj client.Object) (*api.Event, error)
8282
res.Spec.Pods = podresources
8383

8484
var pvcList core.PersistentVolumeClaimList
85-
err = p.PVCLister.List(context.TODO(), &pvcList, client.InNamespace(obj.GetNamespace()), client.MatchingLabels(r.OffshootLabels()))
85+
err = p.PVCLister.List(context.TODO(), &pvcList, client.InNamespace(obj.GetNamespace()), client.MatchingLabels(r.OffshootSelectors()))
8686
if err != nil {
8787
return nil, err
8888
}
@@ -108,5 +108,5 @@ func (p *BillingEventCreator) CreateEvent(obj client.Object) (*api.Event, error)
108108
}
109109

110110
type Resource interface {
111-
OffshootLabels() map[string]string
111+
OffshootSelectors() map[string]string
112112
}

0 commit comments

Comments
 (0)