diff --git a/doc/user-guide.md b/doc/user-guide.md index 48dd93d9d13..958727a3fbd 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -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`: