pkg/metric_generator/generator.go:32:22: 16 bytes saved: struct with 96 pointer bytes could be 80
pkg/metrics_store/metrics_store.go:31:19: 40 bytes saved: struct with 64 pointer bytes could be 24
pkg/options/options.go:42:14: 24 bytes saved: struct of size 384 could be 360
internal/store/builder.go:67:14: 8 bytes saved: struct of size 200 could be 192
internal/store/pod.go:1351:16: 8 bytes saved: struct with 16 pointer bytes could be 8
internal/store/pod.go:1477:20: 8 bytes saved: struct with 16 pointer bytes could be 8
internal/store/testutils.go:32:30: 16 bytes saved: struct with 136 pointer bytes could be 120
pkg/metricshandler/metrics_handler.go:46:21: 8 bytes saved: struct of size 104 could be 96
internal/discovery/types.go:39:19: 32 bytes saved: struct with 88 pointer bytes could be 56
pkg/customresourcestate/config.go:51:15: 16 bytes saved: struct with 112 pointer bytes could be 96
pkg/customresourcestate/config.go:134:16: 8 bytes saved: struct with 88 pointer bytes could be 80
pkg/customresourcestate/config.go:150:13: 8 bytes saved: struct with 40 pointer bytes could be 32
pkg/customresourcestate/config_metrics_types.go:29:18: 8 bytes saved: struct with 64 pointer bytes could be 56
pkg/customresourcestate/config_metrics_types.go:42:17: 8 bytes saved: struct with 40 pointer bytes could be 32
pkg/customresourcestate/registry_factory.go:125:21: 8 bytes saved: struct with 40 pointer bytes could be 32
pkg/customresourcestate/registry_factory.go:212:20: 16 bytes saved: struct with 88 pointer bytes could be 72
pkg/customresourcestate/registry_factory.go:377:23: 8 bytes saved: struct with 104 pointer bytes could be 96
pkg/customresourcestate/registry_factory.go:497:21: 8 bytes saved: struct with 64 pointer bytes could be 56
pkg/customresourcestate/registry_factory.go:549:13: 8 bytes saved: struct with 24 pointer bytes could be 16
Add support for variable VKs in CRS config, while maintaining a cache
of discovered GVKs in the cluster, and updating it every 30s.
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Simplify the implementation of the MetricsWriter to avoid code
duplication between single and multi stores scenarios.
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
Implements https://pkg.go.dev/k8s.io/api/discovery/v1#EndpointSlice
This resourcetype is disabled by default as they are very verbose and
have a high cardinality.
Metrics from endpointslices can be used to identify if specific pods are
part of an endpoint and thus discoverable through a service.
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
Issue: https://github.com/kubernetes/kube-state-metrics/issues/1711
Problem: kube-state-metrics supports up to (latest k8s release - 3) k8s
version. Since v1.25 has been release we can update it to start using
autoscaler/v2.
Solution: update packages to start using autoscaler/v2
Signed-off-by: JoaoBraveCoding <jmarcal@redhat.com>
Support filtering label allowlist by "*", which will expand to the
enabled resources, while infering their values based on its value(s).
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Handle singular labels in allowlist failing when such a label is
supplied, in order to keep the behaviour in sync with --resources.
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Both the PodDisruptionBudget and CronJob resources have been promoted
to v1 as of Kubernetes v1.21 release. The previous v1beta1 versions
are now deprecated, and will be removed in v1.25 and above. This
updates all references to the new v1 versions.
All other allowlist selectors are using plural form of resource name
except PDB. Actually it is a typo introduced by PR[1].
[1] https://github.com/kubernetes/kube-state-metrics/pull/1623
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
This commit introduces kube_*_labels and kube_*_annotations metrics to
poddisruptionbudget to keep in consistency with other k8s objects.
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
autoscaling/v2beta1 HorizontalPodAutoscaler is deprecated in v1.22+ and becomes
unavailable in v1.25+
This change updates the client to use autoscaling/v2beta2
Signed-off-by: Philip Gough <philip.p.gough@gmail.com>