Skip to content

Commit 5ba6622

Browse files
committed
Fix custom resource metrics documentation
Signed-off-by: Evgen Karlashov <[email protected]>
1 parent 335e9e1 commit 5ba6622

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/customresourcestate-metrics.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Two flags can be used:
1414

1515
If both flags are provided, the inline configuration will take precedence.
1616

17+
Apart from specifying one of `--custom-resource-state-config-*` flags, you also need to add a custom resource *Kind* in plural form to the list of existing resources in `--resources` flag. If you don't specify `--resources`, then `--custom-resource-state-config-*` and all available default kubernetes objects will be taken into accout by kube-state-metrics.
18+
1719
```yaml
1820
apiVersion: apps/v1
1921
kind: Deployment
@@ -40,6 +42,7 @@ spec:
4042
- name: active_count
4143
help: "Count of active Foo"
4244
...
45+
- --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,foos,horizontalpodautoscalers,ingresses,jobs,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments,verticalpodautoscalers
4346
```
4447
4548
### Examples

0 commit comments

Comments
 (0)