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

[kube-prometheus-stack] add serviceName option to prometheus CR #5273

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trouaux
Copy link

@trouaux trouaux commented Feb 5, 2025

What this PR does / why we need it

Adding serviceName option to Prometheus CR. This allows prometheus-operator reconciler to associate templated Service to Prometheus StatefulSet instead of creating an operated service.

see https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.PrometheusSpec

Which issue this PR fixes

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I like this change. Currently, the service is just prometheus-operated or alertmanager-operated and the are different from all other names.

However, this is a breaking changes. A lot of people may depend against the operated service names (including the helm chart itself + private deployments)

In order to approve this PR, my requirements are:

And what about Alertmanager?

@trouaux
Copy link
Author

trouaux commented Feb 5, 2025

agree! I will work on those changes, thanks for the feedback

And what about Alertmanager?

Currently alertmanager spec does not support serviceName option, but there is open issue for it and ThanosRuler.
thanos-ruler-operated would be a third service

@jkroepke
Copy link
Member

jkroepke commented Feb 5, 2025

but there is open issue for it and ThanosRuler

good catch, but it seems implemented.

prometheus-operator/prometheus-operator#5632


I will contribute that feature to AM resource. Once implemented, they in this PR, all three components can be adjusted.

@trouaux
Copy link
Author

trouaux commented Feb 5, 2025

but there is open issue for it and ThanosRuler

good catch, but it seems implemented.

prometheus-operator/prometheus-operator#5632

this should be just passing the name of the operated service which is created by default right now governingServiceName

definitely a place to think about when actually implementing the serviceName option

@jkroepke
Copy link
Member

jkroepke commented Feb 5, 2025

Maybe keep this on hold until upstream changes are done.

I would like to avoid 2 breaking changes.

- AM
- Prometheus
- ThanosRuler

Signed-off-by: trouaux <[email protected]>
Signed-off-by: Thomas Rouaux <[email protected]>
@trouaux trouaux force-pushed the prometheus-service-name branch from 3c85a35 to b4cf5d2 Compare February 17, 2025 12:44
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.

[kube-prometheus-stack] Missing spec prometheus.spec.serviceName
2 participants