forked from promitor/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Provide capability to scrape Prometheus metrics in Promitor Res…
…ource Discovery (promitor#60)
- Loading branch information
1 parent
cf6d70e
commit d0ab503
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
promitor-agent-resource-discovery/templates/servicemonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{- if and ( .Values.prometheus.serviceMonitor.enabled ) (.Values.prometheus.enabled ) }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
{{- include "promitor-agent-resource-discovery.labels" . | nindent 4 }} | ||
{{- if .Values.prometheus.serviceMonitor.labels }} | ||
{{ toYaml .Values.prometheus.serviceMonitor.labels | indent 4 }} | ||
{{- end }} | ||
name: {{ template "promitor-agent-resource-discovery.fullname" . }} | ||
{{- if .Values.prometheus.serviceMonitor.namespace }} | ||
namespace: {{ .Values.prometheus.serviceMonitor.namespace }} | ||
{{- end }} | ||
spec: | ||
endpoints: | ||
- targetPort: http | ||
{{- if .Values.prometheus.serviceMonitor.interval }} | ||
interval: {{ .Values.prometheus.serviceMonitor.interval }} | ||
{{- end }} | ||
{{- if .Values.prometheus.serviceMonitor.timeout }} | ||
scrapeTimeout: {{ .Values.prometheus.serviceMonitor.timeout }} | ||
{{- end }} | ||
jobLabel: {{ template "promitor-agent-resource-discovery.fullname" . }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
selector: | ||
matchLabels: | ||
{{- include "promitor-agent-resource-discovery.selectorLabels" . | nindent 6 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters