Skip to content

Operator should create a ServiceMonitor for FeatureStore metrics when metrics: true is enabled #6072

@ntkathole

Description

@ntkathole

When metrics: true is set on the online store in a FeatureStore CR, the operator correctly exposes a Prometheus metrics endpoint on port 8000 and adds the corresponding Service port. However, the operator does not create a ServiceMonitor resource, so the Prometheus Operator has no way to automatically discover and scrape the feature server metrics.

On cluster, where the Prometheus Operator is present, users have to manually create a ServiceMonitor to get metrics scraped or rely on annotation-based discovery.

Expected behavior

When metrics: true is set, the operator should also create a ServiceMonitor owned by the FeatureStore CR, so that the Prometheus Operator automatically discovers and scrapes the feature server metrics endpoint.

ServiceMonitor is not a vanilla Kubernetes resource. It is a CRD provided by the Prometheus Operator (monitoring.coreos.com/v1). The operator must check at runtime whether the CRD exists before attempting to create the resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions