mirror of
https://github.com/mastodon/chart
synced 2025-03-14 21:11:50 +00:00
Add puma metrics for web and sidekiq pods (#170)
This commit is contained in:
parent
8ea5eadf99
commit
1120b745e6
|
@ -206,6 +206,25 @@ spec:
|
|||
- name: OTEL_SERVICE_NAME_SEPARATOR
|
||||
value: "{{ coalesce $context.Values.mastodon.sidekiq.otel.nameSeparator $context.Values.mastodon.otel.nameSeparator }}"
|
||||
{{- end }}
|
||||
{{- if $context.Values.mastodon.metrics.prometheus.enabled }}
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_ENABLED
|
||||
value: "true"
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_LOCAL
|
||||
value: "true"
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_HOST
|
||||
value: "0.0.0.0"
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_PORT
|
||||
value: "{{ $context.Values.mastodon.metrics.prometheus.port }}"
|
||||
{{- if $context.Values.mastodon.metrics.prometheus.sidekiq.detailed }}
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_SIDEKIQ_DETAILED_METRICS
|
||||
value: "true"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $context.Values.mastodon.metrics.prometheus.enabled }}
|
||||
ports:
|
||||
- name: prometheus
|
||||
containerPort: {{ $context.Values.mastodon.metrics.prometheus.port }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if (not $context.Values.mastodon.s3.enabled) }}
|
||||
- name: assets
|
||||
|
|
|
@ -196,6 +196,20 @@ spec:
|
|||
- name: OTEL_SERVICE_NAME_SEPARATOR
|
||||
value: "{{ coalesce .Values.mastodon.web.otel.nameSeparator .Values.mastodon.otel.nameSeparator }}"
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.metrics.prometheus.enabled }}
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_ENABLED
|
||||
value: "true"
|
||||
- name: PROMETHEUS_EXPORTER_HOST
|
||||
value: "127.0.0.1"
|
||||
- name: PROMETHEUS_EXPORTER_PORT
|
||||
value: "{{ .Values.mastodon.metrics.prometheus.port }}"
|
||||
{{- if .Values.mastodon.metrics.prometheus.web.detailed }}
|
||||
- name: MASTODON_PROMETHEUS_EXPORTER_WEB_DETAILED_METRICS
|
||||
value: "true"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: TEST_ENV_VALUE
|
||||
value: {{ .Values.mastodon.metrics.statsd.address }}
|
||||
volumeMounts:
|
||||
{{- if (not .Values.mastodon.s3.enabled) }}
|
||||
- name: assets
|
||||
|
@ -233,6 +247,27 @@ spec:
|
|||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.mastodon.metrics.prometheus.enabled }}
|
||||
- name: prometheus-exporter
|
||||
image: "{{ coalesce .Values.mastodon.web.image.repository .Values.image.repository }}:{{ coalesce .Values.mastodon.web.image.tag .Values.image.tag .Chart.AppVersion }}"
|
||||
command:
|
||||
- ./bin/prometheus_exporter
|
||||
args:
|
||||
- "--bind"
|
||||
- "0.0.0.0"
|
||||
- "--port"
|
||||
- "{{ .Values.mastodon.metrics.prometheus.port }}"
|
||||
resources:
|
||||
requests:
|
||||
cpu: "0.1"
|
||||
memory: "180M"
|
||||
limits:
|
||||
cpu: "0.5"
|
||||
memory: "250M"
|
||||
ports:
|
||||
- name: prometheus
|
||||
containerPort: {{ .Values.mastodon.metrics.prometheus.port }}
|
||||
{{- end }}
|
||||
{{- include "mastodon.statsdExporterContainer" $ | indent 8 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
|
|
18
values.yaml
18
values.yaml
|
@ -434,6 +434,24 @@ mastodon:
|
|||
enabled: false
|
||||
port: 9102
|
||||
|
||||
# Settings for Prometheus metrics. NOTE: Only available in Mastodon v4.4.
|
||||
# For more information, see:
|
||||
# https://docs.joinmastodon.org/admin/config/#prometheus
|
||||
prometheus:
|
||||
enabled: false
|
||||
# Port for the exporter to listen on
|
||||
port: 9394
|
||||
|
||||
# Prometheus for web pods
|
||||
web:
|
||||
# Collect per-controller/action metrics for every request
|
||||
detailed: false
|
||||
|
||||
# Prometheus for sidekiq pods
|
||||
sidekiq:
|
||||
# Collect per-job metrics for every job
|
||||
detailed: false
|
||||
|
||||
# Open Telemetry configuration for all deployments. Component-specific
|
||||
# configuration will override these values.
|
||||
otel:
|
||||
|
|
Loading…
Reference in New Issue
Block a user