Skip to content

Unable to override Prometheus annotation #6411

@arkodg

Description

@arkodg

@arkodg

Yes, so with this tested configuration:

kind: EnvoyProxy
spec:
  provider:
    kubernetes:
        pod:
          annotations:
            prometheus.io/scrape: "false"
  telemetry:
    metrics:
      prometheus:
        disable: false

still results in a pod with these annotations

│     prometheus.io/path: /stats/prometheus                                                                                                                                                                                                                                                                                                                                                                                       │
│     prometheus.io/port: "19001"                                                                                                                                                                                                                                                                                                                                                                                                 │
│     prometheus.io/scrape: "true"

Yes the intention is to to still have the container ports 19001 exposed and the prometheus metrics being generated , just wait to edit annotations

The reason for this is that it causes the datadog agent "openmetrics" check to kick in https://docs.datadoghq.com/containers/kubernetes/prometheus/?tab=kubernetesadv2#advanced-configuration and start scraping the metrics (costing us money). Instead we want the native envoy integration checks which are free https://docs.datadoghq.com/integrations/envoy/ but requires us to turn off the scrape annotation prometheus.io/scrape: "false"

I also tried

kind: Gateway
spec:
  gatewayClassName: envoy-gateway
  infrastructure:
    annotations:
      prometheus.io/scrape: "false"

but it did not regenerate a new replicaset

Originally posted by @crhuber in #6410 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions