1
0
forked from k-space/kube
kube/wildduck/zonemta.yaml

160 lines
4.1 KiB
YAML
Raw Normal View History

2023-08-24 16:53:07 +00:00
---
apiVersion: v1
kind: ConfigMap
metadata:
name: zonemta
namespace: wildduck
data:
pools.toml: |-
[[default]]
address="0.0.0.0"
name="mail.k-space.ee"
plugin-wildduck.toml: |-
[wildduck]
enabled=["receiver", "sender"]
interfaces=["feeder"]
hostname="mail.k-space.ee"
authlogExpireDays=30
[wildduck.srs]
2023-08-27 17:24:36 +00:00
enabled=true
rewriteDomain="k-space.ee"
zonemta.toml: |-
[log]
level="info"
2023-08-27 13:55:48 +00:00
[smtpInterfaces.feeder]
key="/cert/tls.key"
cert="/cert/tls.crt"
port=9465
host="0.0.0.0"
secure=true
2023-08-27 13:55:48 +00:00
processes=1
authentication = true
maxRecipients=100
starttls=false
[plugins]
# @include "plugin-wildduck.toml"
[pools]
# @include "pools.toml"
---
2023-08-24 16:53:07 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: zonemta
spec:
strategy:
type: Recreate
replicas: 2
2023-08-24 16:53:07 +00:00
selector:
matchLabels:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: zonemta
template:
metadata:
labels:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: zonemta
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- zonemta
topologyKey: topology.kubernetes.io/zone
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- wildduck
topologyKey: kubernetes.io/hostname
2023-08-24 16:53:07 +00:00
containers:
2023-08-27 13:55:48 +00:00
- name: zonemta
image: mirror.gcr.io/codemowers/wildduck-zonemta-outbound:latest@sha256:0878c803164e636820398f11a3811f3d92b7771c6202cfe229f97449d0009119
2023-08-24 16:53:07 +00:00
imagePullPolicy: IfNotPresent
command:
- /sbin/tini
- --
- node
- index.js
- --config
- /etc/zonemta/zonemta.toml
2023-08-24 16:53:07 +00:00
ports:
- containerPort: 9465
name: zonemta-msa
- containerPort: 10280
name: api
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
limits:
cpu: 500m
memory: 1000Mi
requests:
cpu: 10m
memory: 500Mi
env:
2023-08-27 17:24:36 +00:00
- name: APPCONF_plugins_wildduck_srs_secret
valueFrom:
secretKeyRef:
name: srs
key: secret
2023-08-24 16:53:07 +00:00
- name: APPCONF_dbs_sender
value: wildduck
2023-08-24 16:53:07 +00:00
- name: APPCONF_dbs_mongo
valueFrom:
secretKeyRef:
2024-08-13 17:18:47 +00:00
name: wildduck-mongodb
key: MONGO_URI
2023-08-24 16:53:07 +00:00
- name: APPCONF_dbs_redis
valueFrom:
secretKeyRef:
2024-08-15 06:49:48 +00:00
name: session-storage
key: REDIS_WILDDUCK_URI
2023-08-24 16:53:07 +00:00
volumeMounts:
- name: cert
mountPath: /cert
- name: zonemta-config
mountPath: /etc/zonemta
readOnly: true
2023-08-24 16:53:07 +00:00
volumes:
- name: zonemta-config
projected:
sources:
- configMap:
name: zonemta
2023-08-24 16:53:07 +00:00
- name: cert
secret:
secretName: wildduck-tls
---
# apiVersion: networking.k8s.io/v1
# kind: NetworkPolicy
# metadata:
# name: zonemta
# spec:
# podSelector:
# matchLabels:
# app.kubernetes.io/name: wildduck
# app.kubernetes.io/component: zonemta
# policyTypes:
# - Ingress
# ingress:
# - ports:
# - port: 9465