Skip to content

Include kubernetes pod status phase in provider metadata #6154

@Alphayeeeet

Description

@Alphayeeeet

Describe the enhancement:

As Cronjobs and Jobs have pod status phase lifecycle, there should be a flag for the phase like "Running", "Container creating", "Completed" etc.

Describe a specific use case for the enhancement or feature:
We try to implement annotations based autodiscovery via condition for scraping prometheus metrics. Unfortunately we have cronjobs with metrics, that complete on some point, from which on they should be ignored by the Prometheus integration. To achieve that, a condition for checking completed jobs is necessary.

What is the definition of done?

The kubernetes metadata provider should include this field. As a followup, condition checks can be built, to exclude pods that are completed.

As reference the doc, for the currently available metadata fields: https://www.elastic.co/guide/en/fleet/current/kubernetes-provider.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions