Skip to content

Commit

Permalink
[prometheus-node-exporter] permit to customize service clusterIP (#4597)
Browse files Browse the repository at this point in the history
* feat(node-exporter): permit to customize clusterIP

It permits to disable clusterIP which is not required to fetch metrics.

On clusters with very huge node number always moving, it create a loadbalancer on each node using much memory and CPU due to watches from the service proxy

Signed-off-by: Loic Blot <[email protected]>

* Correct version numbers in Chart.yaml

Signed-off-by: zeritti <[email protected]>

---------

Signed-off-by: Loic Blot <[email protected]>
Signed-off-by: MH <[email protected]>
Signed-off-by: zeritti <[email protected]>
Co-authored-by: MH <[email protected]>
Co-authored-by: zeritti <[email protected]>
  • Loading branch information
3 people authored Jun 9, 2024
1 parent fe1349e commit 0ce6914
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-node-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- prometheus
- exporter
type: application
version: 4.35.0
version: 4.36.0
appVersion: 1.8.1
home: https://github.com/prometheus/node_exporter/
sources:
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-node-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
clusterIP: "{{ .Values.service.clusterIP }}"
{{- end }}
ports:
- port: {{ .Values.service.port }}
{{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-node-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ kubeRBACProxy:
service:
enabled: true
type: ClusterIP
clusterIP: ""
port: 9100
targetPort: 9100
nodePort:
Expand Down

0 comments on commit 0ce6914

Please sign in to comment.