Skip to content

Commit

Permalink
Merge pull request #29 from arsbest/add-servicemonitor-labels
Browse files Browse the repository at this point in the history
Add servicemonitor labels
  • Loading branch information
zifter authored Dec 9, 2022
2 parents 0887448 + 0801268 commit 475b24c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/domain-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: domain-exporter
description: A Helm chart of domain exporter. Provide prometheus metrics, alerts and dashboard.
type: application
version: 0.3.4
version: 0.3.5
appVersion: "latest"
icon: https://artifacthub.io/static/media/placeholder_pkg_helm.png
home: https://github.com/zifter/helm-charts
Expand Down
3 changes: 3 additions & 0 deletions charts/domain-exporter/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "domain-exporter.labels" . | nindent 4 }}
{{- if .Values.metrics.labels }}
{{ toYaml .Values.metrics.labels | indent 4}}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
3 changes: 3 additions & 0 deletions charts/domain-exporter/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
},
"interval": {
"type": "string"
},
"labels": {
"type": "object"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions charts/domain-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ metrics:
# Interval between metrics scraping
interval: 1m

# Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator
# labels:

# List of domains to monitor
domains:
- google.com

0 comments on commit 475b24c

Please sign in to comment.