cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

rspamd.yaml (4668B)


      1 apiVersion: v1
      2 kind: PersistentVolumeClaim
      3 metadata:
      4   name: rspamd-matrix
      5   namespace: matrix
      6 spec:
      7   resources:
      8     requests:
      9       storage: 1Gi
     10   storageClassName: ceph-filesystem
     11   volumeMode: Filesystem
     12   accessModes:
     13     - ReadWriteMany
     14 ---
     15 apiVersion: v1
     16 kind: PersistentVolumeClaim
     17 metadata:
     18   name: rspamd-clamav
     19   namespace: matrix
     20 spec:
     21   resources:
     22     requests:
     23       storage: 1Gi
     24   storageClassName: ceph-filesystem
     25   volumeMode: Filesystem
     26   accessModes:
     27     - ReadWriteMany
     28 ---
     29 apiVersion: apps/v1
     30 kind: Deployment
     31 metadata:
     32   name: rspamd-matrix
     33   namespace: matrix
     34 spec:
     35   selector:
     36     matchLabels:
     37       app: rspamd-matrix
     38   template:
     39     metadata:
     40       labels:
     41         app: rspamd-matrix
     42     spec:
     43       containers:
     44         - name: rspamd-clamav
     45           image: clamav/clamav-debian:1.4_base
     46           resources:
     47             requests:
     48               memory: "1000Mi"
     49               cpu: "500m"
     50             limits:
     51               memory: "4000Mi"
     52               cpu: "500m"
     53           ports:
     54             - containerPort: 3310
     55               name: clamav
     56           volumeMounts:
     57             - name: run-clamav
     58               mountPath: /run/clamav
     59             - name: rspamd-clamav
     60               mountPath: /var/lib/clamav
     61           env:
     62             - name: CLAMAV_NO_MILTERD
     63               value: "true"
     64           readinessProbe:
     65             exec:
     66               command:
     67                 - "/usr/local/bin/clamdcheck.sh"
     68             initialDelaySeconds: 15
     69             periodSeconds: 10
     70             failureThreshold: 10
     71           livenessProbe:
     72             exec:
     73               command:
     74                 - "/usr/local/bin/clamdcheck.sh"
     75             initialDelaySeconds: 15
     76             periodSeconds: 10
     77             failureThreshold: 10
     78         - name: rspamd-matrix
     79           image: ghcr.io/rspamd/rspamd-docker:latest
     80           resources:
     81             limits:
     82               memory: "1000Mi"
     83               cpu: "500m"
     84           ports:
     85             - containerPort: 11333
     86               name: normal-worker
     87             - containerPort: 11334
     88               name: control-worker
     89           volumeMounts:
     90             - name: rspamd-matrix
     91               mountPath: /var/lib/rspamd
     92             - name: rspamd-config
     93               mountPath: /etc/rspamd/local.d/actions.conf
     94               subPath: actions.conf
     95             - name: rspamd-config
     96               mountPath: /etc/rspamd/local.d/antivirus.conf
     97               subPath: antivirus.conf
     98             - name: rspamd-config
     99               mountPath: /etc/rspamd/local.d/classifier-bayes.conf
    100               subPath: classifier-bayes.conf
    101             - name: rspamd-config
    102               mountPath: /etc/rspamd/local.d/dmarc.conf
    103               subPath: dmarc.conf
    104             - name: rspamd-config
    105               mountPath: /etc/rspamd/local.d/greylist.conf
    106               subPath: greylist.conf
    107             - name: rspamd-config
    108               mountPath: /etc/rspamd/local.d/hfilter.conf
    109               subPath: hfilter.conf
    110             - name: rspamd-config
    111               mountPath: /etc/rspamd/local.d/history_redis.conf
    112               subPath: history_redis.conf
    113             - name: rspamd-config
    114               mountPath: /etc/rspamd/local.d/logging.inc
    115               subPath: logging.inc
    116             - name: rspamd-config
    117               mountPath: /etc/rspamd/local.d/options.inc
    118               subPath: options.inc
    119             - name: rspamd-config
    120               mountPath: /etc/rspamd/local.d/phishing.conf
    121               subPath: phishing.conf
    122             - name: rspamd-config
    123               mountPath: /etc/rspamd/local.d/worker-controller.inc
    124               subPath: worker-controller.inc
    125       volumes:
    126         - name: rspamd-matrix
    127           persistentVolumeClaim:
    128             claimName: rspamd-matrix
    129         - name: rspamd-clamav
    130           persistentVolumeClaim:
    131             claimName: rspamd-clamav
    132         - name: rspamd-config
    133           configMap:
    134             name: rspamd-config
    135         - name: run-clamav
    136           emptyDir: {}
    137 ---
    138 apiVersion: v1
    139 kind: Service
    140 metadata:
    141   name: rspamd-matrix
    142   namespace: matrix
    143 spec:
    144   selector:
    145     app: rspamd-matrix
    146   ports:
    147     - port: 11333
    148       targetPort: 11333
    149       name: normal-worker
    150     - port: 11334
    151       targetPort: 11334
    152       name: control-worker
    153   type: ClusterIP
    154 ---
    155 apiVersion: gateway.networking.k8s.io/v1
    156 kind: HTTPRoute
    157 metadata:
    158   name: rspamd-matrix
    159   namespace: matrix
    160 spec:
    161   parentRefs:
    162     - name: envoy-gateway
    163       namespace: envoy-gateway
    164   hostnames:
    165     - rspamd.matrix.midnightthoughts.space
    166   rules:
    167     - backendRefs:
    168         - name: rspamd-matrix
    169           port: 11334
    170       timeouts:
    171         request: 240s
    172         backendRequest: 0s