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

Support prometheus-operator #47

Open
eh-am opened this issue Jan 28, 2022 · 4 comments
Open

Support prometheus-operator #47

eh-am opened this issue Jan 28, 2022 · 4 comments

Comments

@eh-am
Copy link
Collaborator

eh-am commented Jan 28, 2022

Prometheus operator doesn't use annotations, but uses ServiceMonitors/PodMonitors instead. It would be nice to have first class support for it.

@kolesnikovae
Copy link
Member

kolesnikovae commented Jan 28, 2022

I think we need our own operator with own CRDs: we already mentioned this idea during internal discussions and I believe the time has come.

And that's going to be a separate component (not part of the server) as I see it (optionally, with its own repo and helm chart).

@eh-am
Copy link
Collaborator Author

eh-am commented Jan 28, 2022

Not really, I am talking about having a flag such as serviceMonitor.enabled that generates a yaml like https://github.com/prometheus-operator/prometheus-operator/blob/9c0db5656f04e005de6a0413fd8eb8f11ec99757/example/thanos/prometheus-servicemonitor.yaml

@kolesnikovae
Copy link
Member

Oh, I see - just to enable pyroscope server metrics scraping. Totally makes sense! What I was thinking about is kinda separate topic - perhaps we should revisit it again later.

@eh-am
Copy link
Collaborator Author

eh-am commented Jan 28, 2022

Something simple like this should do the work (using templates of course):

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: pyroscope
  namespace: monitoring
  labels:
     app.kubernetes.io/instance: pyroscope
     app.kubernetes.io/name: pyroscope
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: pyroscope
      app.kubernetes.io/name: pyroscope
  endpoints:
  - port: http

I may create a PR later.

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

No branches or pull requests

2 participants