Skip to content

Commit

Permalink
Allow label filters
Browse files Browse the repository at this point in the history
Using labels specifiers, we can filter to backup just a select set of applications,
eg. `-l 'k8s-app in (kube-dns, traefik)'`
  • Loading branch information
bpineau committed Apr 7, 2018
1 parent d8d2331 commit 3b10e90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (c *Observer) refresh() error {

client := cl.Resource(res.ar.DeepCopy(), metav1.NamespaceAll)

selector := metav1.ListOptions{}
selector := metav1.ListOptions{LabelSelector: c.config.Filter}
lw := &cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return client.List(selector)
Expand Down

0 comments on commit 3b10e90

Please sign in to comment.