agent icon indicating copy to clipboard operation
agent copied to clipboard

podMonitorSelector and podMonitorNamespaceSelector missing from agent-operator.yaml

Open bootstrap314 opened this issue 3 years ago • 2 comments
trafficstars

When setting up the grafana-agent operator using the agent-operator.yaml template, podmonitor resources do not work. The reason they do not work, is missing configuration for podMonitorSelector and podMonitorNamespaceSelector.

Configuring the MetricsInstance as below fixes this issue:

apiVersion: monitoring.grafana.com/v1alpha1
kind: MetricsInstance
metadata:
  labels:
    agent: grafana-agent
  name: grafana-agent-metrics
  namespace: default
spec:
  remoteWrite:
  - basicAuth:
      password:
        key: password
        name: dev-metrics-secret
      username:
        key: username
        name: dev-metrics-secret
    url: https://prometheus-prod-10-prod-us-central-0.grafana.net/api/prom/push
  serviceMonitorNamespaceSelector: {}
  serviceMonitorSelector:
    matchLabels:
      instance: primary
  podMonitorNamespaceSelector: {}
  podMonitorSelector:
    matchLabels:
      instance: primary

Can someone please fix this? This cost my team two days of time, and for some reason was even missed in a ticket we opened with GrafanaCloud support.

bootstrap314 avatar Aug 27 '22 00:08 bootstrap314

@bootstrap314 thanks for reporting this! We will take a look and try to prioritize. Keep an eye on this issue for further updates :pray:

marctc avatar Aug 31 '22 14:08 marctc

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed in 7 days if there is no new activity. Thank you for your contributions!

github-actions[bot] avatar Oct 01 '22 00:10 github-actions[bot]