Merge branch 'MTRNord/media-repo-podmonitor' into 'master'

matrix-media-repo: Add a Podmonitor file

See merge request ananace/charts!44
This commit is contained in:
Alexander Olofsson 2023-04-07 15:48:26 +00:00
commit ea3d04f6a6
3 changed files with 32 additions and 0 deletions

View file

@ -61,6 +61,9 @@ spec:
- name: http
containerPort: 8000
protocol: TCP
- name: metrics
containerPort: 9000
protocol: TCP
livenessProbe:
httpGet:
path: /healthz

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:
- path: /metrics
port: metrics
{{ if .Values.podmonitor.interval }}interval: {{ .Values.podmonitor.interval }}{{ end }}
selector:
matchLabels:
{{- include "matrix-media-repo.selectorLabels" . | nindent 6 }}
{{- end }}

View file

@ -214,6 +214,15 @@ autoscaling:
targetCPUUtilizationPercentage: 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.
##
nodeSelector: {}