matrix-media-repo: Add a Podmonitor file

This commit is contained in:
Marcel 2023-03-20 17:02:04 +00:00
parent 17abe8c43a
commit d994ede38a
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{{- if .Values.podmonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "matrix-media-repo.fullname" . }}
labels:
{{- include "matrix-media-repo.labels" . | nindent 4 }}
spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
podMetricsEndpoints:
- {{- if .Values.serviceAccount.create }}interval: {{ Values.podmonitor.interval | default "30s"}}{{- end }}
path: /metrics
port: metrics
selector:
matchLabels:
{{- include "matrix-media-repo.selectorLabels" . | nindent 6 }}
{{- end }}

View file

@ -214,6 +214,15 @@ autoscaling:
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80
## Configure a PodMonitor definition for the application.
## Requires the Prometheus Operator
##
podmonitor:
enabled: false
## Set the crawl interval (optional)
## Otherwise uses the default setting set in prometheus
# interval: 30s
## Node selectors to use when deploying the application. ## Node selectors to use when deploying the application.
## ##
nodeSelector: {} nodeSelector: {}