Skip to content

Commit

Permalink
Merge pull request #2 from CSdread/314-label-selector
Browse files Browse the repository at this point in the history
adding documentation
  • Loading branch information
CSdread authored and Daniel Feinberg committed Aug 27, 2018
2 parents cd3dd92 + 58be049 commit 146b46a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion doc/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,22 @@ func main() {
}
```

**Note:** The number of concurrent informer workers can be configured with an additional Watch option. The default value is 1 if an argument is not given.
#### Options
**Worker Count**
The number of concurrent informer workers can be configured with an additional Watch option. The default value is 1 if an argument is not given.
```Go
sdk.Watch("cache.example.com/v1alpha1", "Memcached", "default", 5, sdk.WithNumWorkers(n))
```

**Label Selector**
Label selectors allow the watch to filter resources by kubernetes labels. It can be specified using the standard kubernetes label selector format:

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors

```Go
sdk.Watch("cache.example.com/v1alpha1", "Memcached", "default", 5, sdk.WithLabelSelector("app=myapp"))
```

### Define the Memcached spec and status

Modify the spec and status of the `Memcached` CR at `pkg/apis/cache/v1alpha1/types.go`:
Expand Down

0 comments on commit 146b46a

Please sign in to comment.