Skip to content

EC2 SD configuration rejected with no alternative #8305

@clux

Description

@clux

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Description

After it's version gate in #8175

it is no longer possible to use ec2SDConfigs with prometheus >= 3.8.0

But there seems to be nothing indicating that the old non-unified interface is removed.

The 3.8.0 release only references the adding of the new unified interface (link broken in release log)

I don't think we need to restrict users from using the ec2 interface, because prometheus cannot remove it in a minor version (unless they somehow considers it non-breaking). Particularly because we don't even seem to support the alternative aws sd config yet herein.

Steps to Reproduce

New prom, use the old interface. E.g. a ScrapeConfig with a spec like

spec:
  ec2SDConfigs:
  - filters:
    - name: tag:Name
      values:
      - vault
    port: 8200
    refreshInterval: 1m
    region: eu-west-1

Expected Result

Prometheus operator should not reject it when it works upstream and remains documented.

Actual Result

Rejected resources

PrometheusOperatorRejectedResources
summary: Resources rejected by Prometheus operator
description: Prometheus operator in monitoring namespace rejected 2 prometheus/ScrapeConfig resources.

Prometheus Operator Version

relevant versions:

- image: quay.io/prometheus-operator/prometheus-operator:v0.88.0
- image: quay.io/prometheus/prometheus:v3.9.1

Kubernetes Version

Server Version: v1.34.1-eks-3025e55

Kubernetes Cluster Type

EKS

How did you deploy Prometheus-Operator?

helm chart:prometheus-community/kube-prometheus-stack

Manifests

prometheus-operator log output

ts=2026-01-21T13:10:52.144536719Z level=info caller=/go/pkg/mod/k8s.io/client-go@v0.34.3/tools/events/event_broadcaster.go:338 msg="Event occurred" object.name=vault-monitoring-scrapeconfig object.namespace=vault kind=ScrapeConfig apiVersion=monitoring.coreos.com/v1alpha1 type=Warning reason=InvalidConfiguration action=SelectingConfigurationResources note="\"vault/vault-monitoring-scrapeconfig\" was rejected due to invalid configuration: ec2SDConfigs: EC2 SD configuration is only supported for Prometheus version < 3.8.0. For Prometheus 3.8.0 onwards, please use AWS SD"

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions