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 PodMonitor Deployment #1106

Closed
ordukhanian opened this issue Dec 7, 2020 · 9 comments
Closed

Support Prometheus PodMonitor Deployment #1106

ordukhanian opened this issue Dec 7, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@ordukhanian
Copy link
Contributor

Hello,
Could you please support Prometheus PodMonitor configuration and deployment for Spark Operator?
Currently the Spark GCP Operator exposes metrics endpoint, but there is no ability to configure Prometheus integration.

apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: spark-operator-gcp-monitor
  labels:
    <pod monitor labels>
spec:
  podMetricsEndpoints:
    - interval: 5s
      port: metrics
      path: /metrics
      scheme: http
  jobLabel: spark-operator-gcp-monitor
  namespaceSelector:
    matchNames:
      - spark-operator-gcp
  selector:
    matchLabels:
      app.kubernetes.io/name: sparkoperator
@hagaibarel
Copy link
Contributor

Hi,
prometheus-operator integration is usually done using a ServiceMonitor, any specific reason to use a PodMonitor instead?

@ordukhanian
Copy link
Contributor Author

GCP Spark Operator does not deploy a Service when Prometheus metrics are enabled. That's why we decided to use a PodMonitor.

@nicholas-fwang
Copy link
Contributor

hello
I'm also trying to apply pod monitor to spark application.
it's PR for adding container port naming of jmx exporter for pod monitor, but it's not merged currently.
#1099

and I'm developing pod monitor integration with spark operator
#1101

@ordukhanian
Copy link
Contributor Author

@fisache , thank you for the response.
Could you please clarify, you're adding PodMonitor for a Spark application(driver and executor pods) or for the operator's pod?

@anikin-aa
Copy link

Hi!

GCP Spark Operator does not deploy a Service when Prometheus metrics are enabled

May be we should think of creation of such service ?

it's PR for adding container port naming of jmx exporter for pod monitor, but it's not merged currently.

It will be nice to optionally submit pod(service)monitor for spark operator during deployment via helm chart.

@nicholas-fwang
Copy link
Contributor

@fisache , thank you for the response.
Could you please clarify, you're adding PodMonitor for a Spark application(driver and executor pods) or for the operator's pod?

for a Spark application(driver and executor pods)

@liyinan926 liyinan926 added the enhancement New feature or request label Dec 8, 2020
@ordukhanian
Copy link
Contributor Author

@fisache , thank you for the response.
Could you please clarify, you're adding PodMonitor for a Spark application(driver and executor pods) or for the operator's pod?

for a Spark application(driver and executor pods)

Right, but our suggestion is to support pod/service monitor configuration (and optional submission via helm chart) for the Spark operator itself, not for the applications.

@anikin-aa
Copy link

@liyinan926 , do you see some value in adding pod(service) monitor for operator pod ? If so, we can open a PR with changes.

@nicholas-fwang
Copy link
Contributor

@fisache , thank you for the response.
Could you please clarify, you're adding PodMonitor for a Spark application(driver and executor pods) or for the operator's pod?

for a Spark application(driver and executor pods)

Right, but our suggestion is to support pod/service monitor configuration (and optional submission via helm chart) for the Spark operator itself, not for the applications.

I was confused. The operator's monitoring using prometheus-operator seems to be essential :)

ordukhanian added a commit to ordukhanian/spark-on-k8s-operator that referenced this issue Dec 12, 2020
* Supported Prometheus monitoring via pod monitor for the Spark operator's pod.
* Added Prometheus `metrics.portName` to use it for `podMonitor.podMetricsEndpoint` configuration, becuse `targetPort` has been deprecated by Prometheus.
liyinan926 pushed a commit that referenced this issue Dec 12, 2020
* Supported Prometheus monitoring via pod monitor for the Spark operator's pod.
* Added Prometheus `metrics.portName` to use it for `podMonitor.podMetricsEndpoint` configuration, becuse `targetPort` has been deprecated by Prometheus.
ordukhanian added a commit to ordukhanian/spark-on-k8s-operator that referenced this issue Dec 12, 2020
liyinan926 pushed a commit that referenced this issue Dec 12, 2020
jbhalodia-slack pushed a commit to jbhalodia-slack/spark-operator that referenced this issue Oct 4, 2024
* Supported Prometheus monitoring via pod monitor for the Spark operator's pod.
* Added Prometheus `metrics.portName` to use it for `podMonitor.podMetricsEndpoint` configuration, becuse `targetPort` has been deprecated by Prometheus.
jbhalodia-slack pushed a commit to jbhalodia-slack/spark-operator that referenced this issue Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants