Skip to content

Commit

Permalink
add WithLabel list filter
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <[email protected]>
  • Loading branch information
Zbynek Roubalik committed Oct 8, 2020
1 parent b13cd70 commit 0b9b3c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/serving/v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ func WithService(service string) ListConfig {
}
}

// Filter on the provided label
func WithLabel(labelKey, labelValue string) ListConfig {
return func(lo *listConfigCollector) {
lo.Labels[labelKey] = labelValue
}
}

type knServingClient struct {
client clientv1.ServingV1Interface
namespace string
Expand Down

0 comments on commit 0b9b3c0

Please sign in to comment.