From 5ba662251f7a79bdd3149cec67a8e65640b1a92d Mon Sep 17 00:00:00 2001 From: Evgen Karlashov Date: Thu, 7 Jul 2022 11:38:09 +0200 Subject: [PATCH 1/2] Fix custom resource metrics documentation Signed-off-by: Evgen Karlashov --- docs/customresourcestate-metrics.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/customresourcestate-metrics.md b/docs/customresourcestate-metrics.md index b73175d8fb..935d54eca2 100644 --- a/docs/customresourcestate-metrics.md +++ b/docs/customresourcestate-metrics.md @@ -14,6 +14,8 @@ Two flags can be used: If both flags are provided, the inline configuration will take precedence. +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. + ```yaml apiVersion: apps/v1 kind: Deployment @@ -40,6 +42,7 @@ spec: - name: active_count help: "Count of active Foo" ... + - --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 ``` ### Examples From 9197bb28b993cd2a40eb221f4b8f5611c29d04cc Mon Sep 17 00:00:00 2001 From: Evgen Karlashov Date: Fri, 8 Jul 2022 11:07:18 +0200 Subject: [PATCH 2/2] Changes to customresourcestate doc Signed-off-by: Evgen Karlashov --- docs/customresourcestate-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/customresourcestate-metrics.md b/docs/customresourcestate-metrics.md index 935d54eca2..6442c322ac 100644 --- a/docs/customresourcestate-metrics.md +++ b/docs/customresourcestate-metrics.md @@ -14,7 +14,7 @@ Two flags can be used: If both flags are provided, the inline configuration will take precedence. -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. +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. ```yaml apiVersion: apps/v1