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

[prometheus-windows-exporter] Extract the prometheus.io/scrape service annotation #5132

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-windows-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- prometheus
- exporter
type: application
version: 0.7.1
version: 0.8.0
appVersion: 0.29.2
home: https://github.com/prometheus-community/windows_exporter/
sources:
Expand Down
8 changes: 0 additions & 8 deletions charts/prometheus-windows-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ metadata:
namespace: {{ include "prometheus-windows-exporter.namespace" . }}
labels:
{{- include "prometheus-windows-exporter.labels" $ | nindent 4 }}
{{- if or .Values.prometheus.monitor.enabled .Values.prometheus.podMonitor.enabled }}
{{- with .Values.service.annotations }}
annotations:
{{- unset . "prometheus.io/scrape" | toYaml | nindent 4 }}
{{- end }}
{{- else }}
annotations:
prometheus.io/scrape: "true"
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-windows-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ global:
# Allow parent charts to override registry hostname
imageRegistry: ""

## Service configuration
service:
## Service type
type: ClusterIP
## Default service port. Sets the port of the exposed container as well (windows-exporter).
port: 9182
## Port number for service type NodePort
nodePort:
## Name of the service port. Sets the port name of the main container (windows-exporter) as well.
portName: metrics
## Additional annotations and labels for the service.
annotations: {}

# Additional environment variables that will be passed to the daemonset
Expand Down
Loading