rspamd

by KlickTipp

Helm chartv1.8.0App 4.3.1Verified publisher

A Helm chart for deploying Rspamd on Kubernetes

About this chart

rspamd

A Helm chart for deploying Rspamd on Kubernetes

Homepage: https://github.com/klicktipp/helm-charts

Maintainers

NameEmailUrl
vquiehttps://github.com/vquie

Source Code

Ingress controllers

NGINX remains the default controller and continues to render the existing Kubernetes Ingress resources, including regex paths and rewrite annotations:

ingress:
  enabled: true
  controller: nginx
  className: nginx
  singlePodPaths:
    enabled: true

Set controller: contour to render one Contour HTTPProxy per configured host. Main paths come from ingress.hosts[].paths; tenant and per-pod prefixes use native Contour prefix rewriting. NGINX-specific annotations are omitted from each HTTPProxy.

ingress:
  enabled: true
  controller: contour
  className: contour-internal
  singlePodPaths:
    enabled: true
  certManager:
    enabled: true
    issuerRef:
      group: cert-manager.io
      kind: ClusterIssuer
      name: zerossl-prod
  tls:
    - secretName: rspamd.example.com-tls
      hosts:
        - rspamd.example.com

Contour does not provide the Ingress shim lifecycle used by cert-manager annotations on an Ingress. Before migrating an existing NGINX installation, ensure every TLS Secret is managed by an explicit Certificate (either enable ingress.certManager or provide one separately) before removing the old Ingress-owned Certificate.

Values

KeyTypeDefaultDescription
replicaCountint1Number of Rspamd replicas per tenant (or total when multiTenancy=false).
globalobject{"baseURL":"rspamd.example.com"}Global settings used across templates.
global.baseURLstring"rspamd.example.com"Public DNS host used in generated neighbour URLs and ingress host defaults.
imageobject{"pullPolicy":"IfNotPresent","registry":"docker.io","repository":"rspamd/rspamd","tag":""}Container image configuration.
image.registrystring"docker.io"Optional image registry prefix.
image.repositorystring"rspamd/rspamd"Image repository.
image.pullPolicystring"IfNotPresent"Image pull policy.
image.tagstring""Image tag. If empty, chart appVersion is used.
imagePullSecretslist[]Image pull secrets.
nameOverridestring""Partially override generated resource names.
fullnameOverridestring""Fully override generated resource names.
serviceAccountobject{"annotations":{},"automount":false,"automountServiceAccountToken":false,"create":true,"name":""}ServiceAccount configuration.
serviceAccount.createbooltrueCreate a dedicated ServiceAccount.
serviceAccount.automountServiceAccountTokenboolfalseMount ServiceAccount token into pods.
serviceAccount.automountboolfalseDeprecated compatibility key (use automountServiceAccountToken).
serviceAccount.annotationsobject{}ServiceAccount annotations.
serviceAccount.namestring""Explicit ServiceAccount name. If empty, a name is generated.
podAnnotationsobject{}Extra annotations added to the pod template.
podLabelsobject{}Extra labels added to the pod template.
podSecurityContextobject{"fsGroup":11333,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":11333,"runAsNonRoot":true,"runAsUser":11333,"seccompProfile":{"type":"RuntimeDefault"}}Pod-level security context.
podSecurityContext.runAsNonRootbooltrueEnsure the container does not run as root.
podSecurityContext.fsGroupint11333Unix group id for mounted volumes.
podSecurityContext.fsGroupChangePolicystring"OnRootMismatch"Avoid unnecessary recursive ownership changes on mounted volumes.
podSecurityContext.runAsUserint11333Unix user id.
podSecurityContext.runAsGroupint11333Unix group id.
podSecurityContext.seccompProfileobject{"type":"RuntimeDefault"}Use the container runtime's default seccomp profile.
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}Container-level security context.
securityContext.allowPrivilegeEscalationboolfalsePrevent privilege escalation inside the container.
securityContext.capabilitiesobject{"drop":["ALL"]}Drop all Linux capabilities by default.
terminationGracePeriodSecondsint30Pod termination grace period in seconds.
enableServiceLinksboolfalseDisable automatic injection of Service environment variables.
priorityClassNamestring""Optional priority class for pods.
revisionHistoryLimitint10Number of old StatefulSet revisions to retain.
podManagementPolicystring"OrderedReady"StatefulSet pod management policy.
updateStrategyobject{"type":"RollingUpdate"}StatefulSet update strategy.
updateStrategy.typestring"RollingUpdate"Strategy type, usually RollingUpdate or OnDelete.
servicesobject{"controller":11334,"proxy":11332,"worker":11333}Named service ports used by Service, probes and ingress defaults.
services.proxyint11332Proxy port.
services.workerint11333Worker/UI/API port.
services.controllerint11334Controller port.
metricsobject{"additionalLabels":{},"enabled":true,"interval":"60s","path":"/metrics","scrapeTimeout":""}Metrics and PodMonitor settings.
metrics.enabledbooltrueEnable PodMonitor creation when CRD exists.
metrics.additionalLabelsobject{}Extra labels added to the PodMonitor.
metrics.intervalstring"60s"Scrape interval.
metrics.scrapeTimeoutstring""Optional scrape timeout.
metrics.pathstring"/metrics"Metrics path on the worker port.
ingressobject{"annotations":{},"certManager":{"enabled":false,"issuerRef":{"group":"cert-manager.io","kind":"ClusterIssuer","name":""}},"className":"","controller":"nginx","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"backend":{"serviceName":"","servicePort":11333},"path":"/","pathType":"Prefix"}]}],"singlePodPaths":{"enabled":true},"tls":[]}Ingress configuration.
ingress.enabledboolfalseEnable ingress resources.
ingress.controllerstring"nginx"Ingress controller implementation. Supported values are nginx and contour.
ingress.classNamestring""ingressClassName value used by Ingress or HTTPProxy.
ingress.annotationsobject{}Annotations added to Ingress resources. Contour HTTPProxy resources omit NGINX-specific annotations.
ingress.hostslist[{"host":"chart-example.local","paths":[{"backend":{"serviceName":"","servicePort":11333},"path":"/","pathType":"Prefix"}]}]Ingress host/path rules.
ingress.hosts[0].paths[0].backend.serviceNamestring""Service name for this ingress path. If empty, defaults to chart Service.
ingress.hosts[0].paths[0].backend.servicePortint11333Service port for this ingress path. If empty, defaults to services.worker.
ingress.tlslist[]TLS sections.
ingress.certManagerobject{"enabled":false,"issuerRef":{"group":"cert-manager.io","kind":"ClusterIssuer","name":""}}Optional explicit cert-manager Certificate management for Contour TLS.
ingress.certManager.enabledboolfalseCreate cert-manager Certificate resources in Contour mode.
ingress.certManager.issuerRefobject{"group":"cert-manager.io","kind":"ClusterIssuer","name":""}cert-manager issuer reference used by generated Certificates.
ingress.certManager.issuerRef.groupstring"cert-manager.io"API group of the cert-manager issuer.
ingress.certManager.issuerRef.kindstring"ClusterIssuer"Issuer resource kind.
ingress.certManager.issuerRef.namestring""Issuer resource name. Required when Certificate creation is enabled with TLS.
ingress.singlePodPathsobject{"enabled":true}Extra ingress exposing per-pod endpoints for neighbour calls.
ingress.singlePodPaths.enabledbooltrueEnable dedicated per-pod ingress rules.
resourcesobject{}Container resource requests and limits.
livenessProbeobject{"initialDelaySeconds":30,"tcpSocket":{"port":"worker"}}Liveness probe settings.
readinessProbeobject{"httpGet":{"path":"/ping","port":"worker"},"initialDelaySeconds":10,"periodSeconds":5}Readiness probe settings.
startupProbeobject{"failureThreshold":30,"httpGet":{"path":"/ping","port":"worker"},"periodSeconds":5}Startup probe settings.
autoscalingobject{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80,"targetMemoryUtilizationPercentage":null}Horizontal Pod Autoscaler settings.
autoscaling.enabledboolfalseEnable HPA.
autoscaling.minReplicasint1Minimum number of replicas.
autoscaling.maxReplicasint100Maximum number of replicas.
autoscaling.targetCPUUtilizationPercentageint80Target average CPU utilization percentage.
autoscaling.targetMemoryUtilizationPercentagestringnilTarget average memory utilization percentage.
volumeslist[]Additional volumes mounted into the pod.
volumeMountslist[]Additional volume mounts for the Rspamd container.
nodeSelectorobject{}Node selector for pod scheduling.
tolerationslist[]Tolerations for pod scheduling.
podAntiAffinityobject{"topologyKey":"kubernetes.io/hostname","type":"soft"}Pod anti-affinity shortcut used when affinity is empty.
podAntiAffinity.typestring"soft""soft", "hard" or "disabled".
podAntiAffinity.topologyKeystring"kubernetes.io/hostname"Topology key used by anti-affinity.
topologySpreadConstraintslist[]Topology spread constraints for pod scheduling.
affinityobject{}Native affinity rules. If set, this is used as-is.
customAffinityobject{}Deprecated compatibility key for affinity (prefer affinity).
extraEnvsobject{}Additional environment variables as plain text (ConfigMap-backed).
extraEnvobject{}Deprecated compatibility key for extraEnvs.
extraSecretsobject{}Additional environment variables as secrets (Secret-backed, values are plain text).
envFromlist[]Existing ConfigMaps or Secrets added as environment variable sources.
extraEnvFromlist[]Deprecated compatibility alias for envFrom.
extraObjectslist[]Additional arbitrary Kubernetes objects rendered via tpl.
multiTenancyboolfalseEnable multi-tenant mode (one StatefulSet and Services per config key).
configobject{}Rspamd config files written to /etc/rspamd/local.d/. In multiTenancy mode this must be a map: tenant -> (filename -> content). In single-tenant mode this must be a map: filename -> content.
podDisruptionBudgetobject{}PodDisruptionBudget spec snippet. Example: { maxUnavailable: 1 }
persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"8Gi","storageClass":""}Persistent volume configuration for /data.
persistence.enabledboolfalseEnable persistent storage.
persistence.storageClassstring""StorageClass name. Leave empty to use cluster default StorageClass.
persistence.accessModeslist["ReadWriteOnce"]Access modes for the PVC.
persistence.sizestring"8Gi"Requested storage size.
persistence.annotationsobject{}PVC annotations.

Examples

1. Multi-tenant generic setup

Example for inbound/outbound tenant split with ingress, persistence and generic placeholders.

---
# Generic multi-tenant example values for rspamd.
# This file intentionally uses placeholder domains/hosts and no secrets.

global:
  baseURL: "rspamd.<env>.example.com"

replicaCount: 2

image:
  # Example: private mirror/registry
  registry: "registry.example.com/dockerhub-mirror"

extraSecrets:
  # Provide values via --set-string or an external values file in CI/CD.
  ADMINPASSWORD: "<replace-me>"

ingress:
  enabled: true
  className: "nginx"
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/client-body-buffer-size: "100K"
  hosts:
    - host: "rspamd.<env>.example.com"
      paths:
        - path: /
          pathType: Prefix
          backend:
            serviceName: ""
            servicePort: 11334
        - path: /checkv2
          pathType: Prefix
          backend:
            serviceName: ""
            servicePort: 11333
  tls:
    - secretName: "rspamd-<env>-tls"
      hosts:
        - "rspamd.<env>.example.com"

nodeSelector:
  kubernetes.io/os: linux

podDisruptionBudget:
  minAvailable: 1

persistence:
  enabled: true
  storageClass: "standard"

multiTenancy: true

config:
  inbound:
    logging.inc: |
      level = notice;
      log_json = true;
    options.inc: |
      dns {
        nameserver = "1.1.1.1";
      }
      dynamic_conf = "/data/rspamd_dynamic";
    worker-controller.inc: |
      password = "{= env.adminpassword|pbkdf =}";
    actions.conf: |
      gre

Deploy rspamd with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rspamd on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrspamd is pinned at v1.8.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply