Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push of additionalScrapeConfigs to PrometheusAgent #2312

Merged

Conversation

stijzermans
Copy link
Contributor

@stijzermans stijzermans commented Sep 5, 2024

Implement #2311, so both Prometheuses and PrometheusAgents can be updated with additionalScrapeConfigs.

How to test:

  • Make sure prometheus-operator is installed and watching a namespace.
  • Deploy PrometheusAgent in that watched namespace, through applying a manifest like:
apiVersion: monitoring.coreos.com/v1alpha1
kind: PrometheusAgent
metadata:
  name: prometheus-grafana-kube-pr-prometheus
spec:
  arbitraryFSAccessThroughSMs: {}
  externalUrl: http://prometheus-grafana-kube-pr-prometheus:9090
  hostNetwork: false
  image: quay.io/prometheus/prometheus:v2.54.1
  listenLocal: false
  logFormat: logfmt
  logLevel: info
  paused: false
  podMonitorNamespaceSelector: {}
  podMonitorSelector: {}
  portName: http-web
  probeNamespaceSelector: {}
  probeSelector: {}
  replicas: 1
  resources: {}
  routePrefix: /
  scrapeConfigNamespaceSelector: {}
  scrapeConfigSelector:
    matchLabels:
      release: prometheus-grafana
  scrapeInterval: 30s
  serviceAccountName: prometheus-grafana-kube-pr-prometheus
  serviceMonitorNamespaceSelector: {}
  serviceMonitorSelector: {}
  shards: 1
  version: v2.54.1
  walCompression: true
  • Make sure at least PROMETHEUS_NAMESPACE is set in the minio-operator env to this watched namespace, minio-operator should then update the additionalScrapeConfigs attribute of the Prometheus agent when running.

@stijzermans stijzermans changed the title Implement scraping of PrometheusAgent Implement push of additionalScrapeConfigs to PrometheusAgent Sep 5, 2024
@stijzermans stijzermans changed the title Implement push of additionalScrapeConfigs to PrometheusAgent Push of additionalScrapeConfigs to PrometheusAgent Sep 5, 2024
@pjuarezd
Copy link
Member

pjuarezd commented Sep 5, 2024

Looks good to me, is there any reason we are aware of to do not support PrometheusAgent @cesnietor?

@cesnietor
Copy link
Contributor

LGTM we should support it. thanks for the PR.

@pjuarezd pjuarezd force-pushed the feature/scrape-prometheusagent branch from 04dbb78 to 3955009 Compare September 11, 2024 06:16
@pjuarezd
Copy link
Member

LGTM we should support it. thanks for the PR.

Thank you!, could you approve please? @cesnietor

@harshavardhana harshavardhana merged commit b28a0b4 into minio:master Sep 11, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants