Skip to content

[TASK] Create Helm Subchart for Rspamd Service #322

@Aravinda-HWK

Description

@Aravinda-HWK

What needs to be done?

📌 Overview

Develop a Helm subchart for deploying the Rspamd service as part of the email system. The chart should package Rspamd with its required configuration, storage, and networking, enabling spam filtering capabilities within the Kubernetes-based mail pipeline.


🎯 Objectives

  • Package Rspamd as a reusable Helm subchart.
  • Enable spam filtering and email analysis within the system.
  • Provide flexible configuration using values.yaml.
  • Ensure compatibility with other email components (e.g., Postfix, OpenDKIM).

🧩 Scope

1. Chart Initialization

  • Create a new Helm chart under:

    charts/rspamd
    
  • Define Chart.yaml with appropriate metadata.


2. Kubernetes Resources

Implement templates for:

  • Deployment (or StatefulSet if persistence is required)

    • Run Rspamd container
    • Mount configuration and data directories
    • Configure health probes
  • Service

    • Expose Rspamd ports internally:

      • 11332 (milter/worker)
      • 11334 (web UI / HTTP interface)
  • ConfigMap

    • Mount configuration from:

      /etc/rspamd/local.d
      
    • Allow dynamic configuration via Helm values

  • PersistentVolumeClaim (optional but recommended)

    • Store Rspamd data:

      /var/lib/rspamd
      
    • Store logs:

      /var/log/rspamd
      

3. Configuration (values.yaml)

Support configurable parameters:

  • Image

    image:
      repository: rspamd/rspamd
      tag: latest
      pullPolicy: IfNotPresent
  • Service

    service:
      type: ClusterIP
      ports:
        - name: worker
          port: 11332
        - name: web
          port: 11334
  • Resources

    resources:
      requests:
        cpu: 100m
        memory: 256Mi
      limits:
        cpu: 1
        memory: 1Gi
  • Persistence

    persistence:
      enabled: true
      storageClass: <storage-class>
      size: 5Gi
  • Redis (optional)

    redis:
      enabled: false
      host: ""
      port: 6379

4. Configuration Management

  • Mount local.d configuration directory via ConfigMap.
  • Allow custom configuration overrides through Helm values.
  • Ensure configuration changes trigger rolling updates (checksum annotations).

5. Networking

  • Expose Rspamd internally via ClusterIP service.
  • Ensure compatibility with Postfix (future integration via milter).

6. Health Checks

  • Add:

    • Readiness probe (HTTP check on port 11334)
    • Liveness probe (HTTP or TCP check)

7. Optional Integrations

  • Prepare for Redis integration (do not enforce dependency yet).
  • Ensure compatibility with ClamAV for antivirus scanning.

8. Testing

  • Add Helm test hook to validate:

    • Rspamd service accessibility
    • HTTP endpoint responsiveness

9. Documentation

  • Create README.md including:

    • Installation instructions
    • Configuration guide
    • Integration notes (Postfix, Redis, ClamAV)

📦 Deliverables

  • Complete rspamd Helm subchart
  • Configurable values.yaml
  • Kubernetes templates (Deployment/Service/ConfigMap/PVC)
  • Documentation

✅ Acceptance Criteria

  • Rspamd can be deployed independently via Helm.
  • Service is reachable internally within the cluster.
  • Configuration is dynamically rendered via Helm values.
  • Persistence works correctly (if enabled).
  • Chart is reusable and integrates with the umbrella chart.

🔗 Notes

  • Keep the chart loosely coupled to allow independent deployment.
  • Avoid hard dependency on Redis in this stage.
  • Follow Helm best practices for naming, labels, and templating.

Metadata

Metadata

Assignees

Labels

ImprovementThe functionality is working but can be improved.enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions