This commit adds the kube_*_deletion_timestamp metric for several Kubernetes resources:
- Deployments
- DaemonSets
- StatefulSets
- Services
- PodDisruptionBudgets
The deletion timestamp metric reports the Unix timestamp when a resource
was marked for deletion. This helps with monitoring resource lifecycle
and cleanup processes.
All metrics follow the same pattern:
- Help text: 'Unix deletion timestamp'
- Type: gauge
- Value: Unix timestamp in seconds when DeletionTimestamp is set,
otherwise the metric is not emitted
Updated documentation and tests are included for all affected resources.
use clientgofix library
add context parameter in verticalpodautoscaler
rename PodDisruptionsAllowed to DisruptionsAllowed because of PR 85863 in k8s repo
lint fixes and rename PodDisruptionsAllowed to DisruptionsAllowed in test file
run go mod tidy
- To allow other external Stores, remove the `FamilyByteSlicer` interface
and give access directly to `metric.Family`.
- Move functions present in `pkg/metric/generator.go` to a dedicated package
`generator` in `pkg/metric_generator/generator.go`.
Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
Since the removal of collector, this introduces both the concept of the
store and the resources instead of collectors that the user passes in.
The user facing logs and flags were not changed as that would be a
regression.