update mail - migrate from opendkim and opendmarc to rspamd

This commit is contained in:
ace
2021-01-17 04:14:26 +03:00
parent 5c5aa01d41
commit da8de30b27
5 changed files with 91 additions and 18 deletions

View File

@@ -1 +1,22 @@
{{- range $key, $val := (index .Values.rspamd "local.d") }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rspamd-{{ $key | replace "_" "-" | replace "." "-" }}
data:
{{ $key | indent 2 }}: |
{{ $val | indent 4 }}
{{- end }}
{{- range $key, $val := (index .Values.rspamd "dkim-keys") }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rspamd-dkim-{{ $key | replace "." "-" }}
data:
{{ $key | indent 2 }}: |
{{ $val | indent 4 }}
{{- end }}

View File

@@ -33,6 +33,26 @@ spec:
- name: rspamd-proxy
containerPort: 11332
protocol: TCP
- name: rspamd-normal
containerPort: 11333
protocol: TCP
- name: rspamd-ctrl
containerPort: 11334
protocol: TCP
- name: rspamd-fuzzy
containerPort: 11335
protocol: TCP
volumeMounts:
{{- range $key, $val := (index .Values.rspamd "local.d") }}
- name: rspamd-{{ $key | replace "_" "-" | replace "." "-" }}
mountPath: "/etc/rspamd/local.d/{{ $key }}"
subPath: {{ $key }}
{{- end }}
{{- range $key, $val := (index .Values.rspamd "dkim-keys") }}
- name: rspamd-dkim-{{ $key | replace "." "-" }}
mountPath: "/var/lib/rspamd/dkim/{{ $key }}.key"
subPath: {{ $key }}
{{- end }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
@@ -41,6 +61,16 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
{{- range $key, $val := (index .Values.rspamd "local.d") }}
- name: rspamd-{{ $key | replace "_" "-" | replace "." "-" }}
configMap:
name: rspamd-{{ $key | replace "_" "-" | replace "." "-" }}
{{- end }}
{{- range $key, $val := (index .Values.rspamd "dkim-keys") }}
- name: rspamd-dkim-{{ $key | replace "." "-" }}
configMap:
name: rspamd-dkim-{{ $key | replace "." "-" }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@@ -11,5 +11,17 @@ spec:
targetPort: 11332
protocol: TCP
name: rspamd-proxy
- port: 11333
targetPort: 11333
protocol: TCP
name: rspamd-normal
- port: 11334
targetPort: 11334
protocol: TCP
name: rspamd-ctrl
- port: 11335
targetPort: 11335
protocol: TCP
name: rspamd-fuzzy
selector:
{{- include "rspamd.selectorLabels" . | nindent 4 }}