prometheus-community / helm-charts

Prometheus community Helm charts
Apache License 2.0
4.99k stars 4.99k forks source link

[kube-prometheus-stack] | Restart deployment prometheus-kube-prometheus-operator change service type to ClusterIp #3304

Open silviaDominguezP opened 1 year ago

silviaDominguezP commented 1 year ago

Describe the bug a clear and concise description of what the bug is.

Hi All, I've changed the service of prometheus operator to expose it as a service, so I changed the service type to NodePort. The problem is every time the deployment is restarted the service type associated is changed to ClusterIp. How can I permanently nodeport it?

Thanks in advance

What's your helm version?

v3.11.0

What's your kubectl version?

Client Version: v1.25.4 Kustomize Version: v4.5.7 Server Version: v1.25.4

Which chart?

kube-prometheus-stack-45.21.0

What's the chart version?

v0.63.0

What happened?

I want to change the service prometheus-operated to put it from ClusterIp as NodePort. It works fine until for example you restart the deployment associated. Then the service type is again ClusterIp.

What you expected to happen?

I want to leave it permanently as NodePort service

How to reproduce it?

Change the service's spec as follow

Then restart. You'll see as the service type has changed to ClusterIp

Enter the changed values of values.yaml?

None

Enter the command that you execute and failing/misfunctioning.

helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring Delete service prometheus-operated Create service prometheus-operated with NodePort: `apiVersion: v1 kind: Service metadata: name: prometheus-operated namespace: monitoring labels: operated-prometheus: 'true' annotations: ownerReferences:

Anything else we need to know?

No response

zeritti commented 1 year ago

Service prometheus-operated cannot be modified, it is created directly by Prometheus operator, a headless service with a different purpose. There is no means for affecting this service in the chart.

If you wish to modify the Prometheus service, i.e. service [FULLNAME]-prometheus, you can set its properties in prometheus.service (scope of your code above is not obvious).

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.