Resource State Metrics’ source.
34
stars
155
commits
Go
primary language
Sep 7, 2026
updated
resource-state-metricsresource-state-metrics is a Kubernetes controller that builds on Kube-State-Metrics' Custom Resource State's ideology and generates metrics for custom resources based on the configuration specified in its managed resource, ResourceMetricsMonitor.
Start developing by following these steps:
make setup.make local.make apply_testdata.
:9998/metrics.:9999/metrics.pprof session with make pprof.For more details, take a look at the Makefile targets.
value should be a float64).pkg/ being an exception (for managed types and such).unmarshalled into a set of stores that the codebase directly operates on. There is no middle-ware that processes the configuration before it is used, in order to avoid unnecessary complexity. However, the expression(s) within the value and labelValues may need to be evaluated before being used, and as such, are exceptions./external). Such metrics are exposed through the /external endpoint of the "main" instance and defined in ./external.ResourceMetricsMonitor is namespace-scoped, but, to keep in accordance with KubeStateMetrics' CustomResourceState, which allows for collecting metrics from cluster-wide resources, it is possible to omit the field and label selectors to achieve that result.client_python's OpenMetrics implementation is the single source of truth upon which the various metric type implementations here are based on and tested against.s/stores/generatorsmixins..out?).ResourceMetricsMonitor CRD.Starlark resolver (for more demanding use-cases)ResourceMetricsMonitor CRD.s/CRSM/CRDMetrics.s/CRDMetrics/ResourceStateMetrics.ResourceMetricsMonitor namespaced-scope. This allows for:
finalizers), since currently the namespace-scoped deployment manages its cluster-scoped resourcesResourceMetricsMonitors are user-managed, and should persist.Go
81.8%
Shell
9.8%
Jsonnet
5.0%
Makefile
3.2%
Resource State Metrics’ source.
34
stars
155
commits
Go
primary language
Sep 7, 2026
updated
resource-state-metricsresource-state-metrics is a Kubernetes controller that builds on Kube-State-Metrics' Custom Resource State's ideology and generates metrics for custom resources based on the configuration specified in its managed resource, ResourceMetricsMonitor.
Start developing by following these steps:
make setup.make local.make apply_testdata.
:9998/metrics.:9999/metrics.pprof session with make pprof.For more details, take a look at the Makefile targets.
value should be a float64).pkg/ being an exception (for managed types and such).unmarshalled into a set of stores that the codebase directly operates on. There is no middle-ware that processes the configuration before it is used, in order to avoid unnecessary complexity. However, the expression(s) within the value and labelValues may need to be evaluated before being used, and as such, are exceptions./external). Such metrics are exposed through the /external endpoint of the "main" instance and defined in ./external.ResourceMetricsMonitor is namespace-scoped, but, to keep in accordance with KubeStateMetrics' CustomResourceState, which allows for collecting metrics from cluster-wide resources, it is possible to omit the field and label selectors to achieve that result.client_python's OpenMetrics implementation is the single source of truth upon which the various metric type implementations here are based on and tested against.s/stores/generatorsmixins..out?).ResourceMetricsMonitor CRD.Starlark resolver (for more demanding use-cases)ResourceMetricsMonitor CRD.s/CRSM/CRDMetrics.s/CRDMetrics/ResourceStateMetrics.ResourceMetricsMonitor namespaced-scope. This allows for:
finalizers), since currently the namespace-scoped deployment manages its cluster-scoped resourcesResourceMetricsMonitors are user-managed, and should persist.Go
81.8%
Shell
9.8%
Jsonnet
5.0%
Makefile
3.2%