Skip to content

feat: add metrics monitoring for rspamd and dovecot#461

Merged
fastlorenzo merged 6 commits intomasterfrom
openmetrics
Sep 5, 2025
Merged

feat: add metrics monitoring for rspamd and dovecot#461
fastlorenzo merged 6 commits intomasterfrom
openmetrics

Conversation

@fastlorenzo
Copy link
Copy Markdown
Collaborator

@fastlorenzo fastlorenzo commented Sep 5, 2025

This pull request introduces support for monitoring Dovecot and Rspamd services with Prometheus using ServiceMonitor resources, including configuration options and network policy updates to enable secure metrics scraping. It also refactors network policy templates for better maintainability and adds validation to ensure correct configuration of Dovecot metrics monitoring.

Monitoring and ServiceMonitor integration:

  • Added Prometheus ServiceMonitor support for Dovecot and Rspamd, including new configuration options (serviceMonitor.enabled, interval, relabelings, and metricRelabelings) in values.yaml and documented them in README.md. [1] [2] [3] [4] [5]
  • Updated Dovecot deployment and service templates to expose a metrics port (9900) when ServiceMonitor is enabled. [1] [2]
  • Added a Helm template validation to warn users if Dovecot ServiceMonitor is enabled but no configuration overrides are set, preventing misconfiguration. [1] [2]

Network policy improvements:

  • Refactored network policy templates: removed monolithic network-policies.yaml and split policies into separate files for egress, metrics, and other rules, improving maintainability and clarity. [1] [2] [3]
  • Added a dedicated network policy to allow Prometheus monitoring pods to access the Dovecot metrics endpoint securely, with configurable namespace and pod selectors. [1] [2]

CI/CD and testing updates:

  • Updated GitHub Actions workflow to install Prometheus CRDs before running chart tests, ensuring ServiceMonitor resources are recognized during CI runs.

Signed-off-by: fastlorenzo <git@bernardi.be>
Signed-off-by: fastlorenzo <git@bernardi.be>
Signed-off-by: fastlorenzo <git@bernardi.be>
Signed-off-by: fastlorenzo <git@bernardi.be>
Signed-off-by: fastlorenzo <git@bernardi.be>
Signed-off-by: fastlorenzo <git@bernardi.be>
@fastlorenzo fastlorenzo merged commit cf3c2fa into master Sep 5, 2025
4 checks passed
@fastlorenzo fastlorenzo deleted the openmetrics branch September 5, 2025 14:43
hagak pushed a commit to hagak/helm-charts that referenced this pull request Oct 1, 2025
* feat: add metrics monitoring for rspamd

Signed-off-by: fastlorenzo <git@bernardi.be>

* Added missing networkpolicies config

Signed-off-by: fastlorenzo <git@bernardi.be>

* fix indentation

Signed-off-by: fastlorenzo <git@bernardi.be>

* Install Prometheus CRDs in CI to test serviceMonitors

Signed-off-by: fastlorenzo <git@bernardi.be>

* fix ci

Signed-off-by: fastlorenzo <git@bernardi.be>

* Add dovecot metrics

Signed-off-by: fastlorenzo <git@bernardi.be>

---------

Signed-off-by: fastlorenzo <git@bernardi.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant