-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm): add support for metrics in the chart (#924)
* Add support for metrics in chart Signed-off-by: François BIBRON <[email protected]> * feat: add serviceMonitor Signed-off-by: François BIBRON <[email protected]> * feat: fix values Signed-off-by: François BIBRON <[email protected]> * feat: fix values Signed-off-by: François BIBRON <[email protected]> * feat: fix values Signed-off-by: François BIBRON <[email protected]> * fix values and typos Signed-off-by: François Bibron <[email protected]> * fix typo Signed-off-by: François Bibron <[email protected]> * fix CS --------- Signed-off-by: François BIBRON <[email protected]> Signed-off-by: François Bibron <[email protected]> Co-authored-by: Kévin Dunglas <[email protected]>
- Loading branch information
Showing
4 changed files
with
82 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
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,28 @@ | ||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "mercure.fullname" . }}-metrics | ||
labels: | ||
{{- include "mercure.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: metrics | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: metrics | ||
endpoints: | ||
- port: metrics | ||
{{- if .Values.metrics.serviceMonitor.interval }} | ||
interval: {{ .Values.metrics.serviceMonitor.interval }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
{{- end }} | ||
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }} | ||
{{- if .Values.metrics.serviceMonitor.relabelings }} | ||
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.relabelings | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.relabelings }} | ||
relabelings: {{- toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }} | ||
{{- end }} | ||
{{- 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