-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(metrics): add prometheus endpoint (#147)
Co-authored-by: Fabio Bonelli Co-authored-by: Nicola Squartini
- Loading branch information
1 parent
ebc5993
commit 5880e05
Showing
6 changed files
with
484 additions
and
4 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
35 changes: 35 additions & 0 deletions
35
charts/developers-italia-api/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,35 @@ | ||
{{- if .Values.serviceMonitor.enabled -}} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "developers-italia-api.fullname" . }} | ||
labels: | ||
{{- include "developers-italia-api.labels" . | nindent 4 }} | ||
{{- if .Values.serviceMonitor.additionalLabels }} | ||
{{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
endpoints: | ||
- port: http | ||
{{- if .Values.serviceMonitor.interval }} | ||
interval: {{ .Values.serviceMonitor.interval }} | ||
{{- end }} | ||
{{- if .Values.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} | ||
{{- end }} | ||
{{- if .Values.serviceMonitor.jobLabel }} | ||
jobLabel: {{ .Values.serviceMonitor.jobLabel | quote }} | ||
{{- end }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
{{- if .Values.serviceMonitor.targetLabels }} | ||
targetLabels: | ||
{{- range .Values.serviceMonitor.targetLabels }} | ||
- {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
selector: | ||
matchLabels: | ||
{{- include "developers-italia-api.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
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
Oops, something went wrong.