Skip to content

Commit fad76e4

Browse files
authored
Merge pull request kubernetes#1784 from ikarlashov/fix_customresourcestate_doc
Fix custom resource metrics documentation
2 parents 3fc5dd3 + 9197bb2 commit fad76e4

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+
In addition to specifying one of `--custom-resource-state-config*` flags, you should also add the custom resource *Kind*s in plural form to the list of exposed resources in the `--resources` flag. If you don't specify `--resources`, then all known custom resources configured in `--custom-resource-state-config-*` and all available default kubernetes objects will be taken into account 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)