kube/wildduck/wildduck.yaml

128 lines
3.2 KiB
YAML
Raw Normal View History

2023-08-24 16:53:07 +00:00
---
apiVersion: codemowers.cloud/v1beta1
kind: SecretClaim
2023-08-24 16:53:07 +00:00
metadata:
name: dragonfly-auth
spec:
size: 32
mapping:
- key: password
value: "%(plaintext)s"
- key: REDIS_URI
value: "redis://:%(plaintext)s@dragonfly"
---
apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
name: dragonfly
2023-08-24 16:53:07 +00:00
spec:
authentication:
passwordFromSecret:
key: password
name: dragonfly-auth
replicas: 3
resources:
limits:
memory: 5Gi
2023-08-24 16:53:07 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: wildduck-api
spec:
selector:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: wildduck
ports:
- port: 8080
name: wildduck-api
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wildduck
spec:
replicas: 2
2023-08-24 16:53:07 +00:00
selector:
matchLabels:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: wildduck
template:
metadata:
labels:
app.kubernetes.io/name: wildduck
app.kubernetes.io/component: wildduck
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- wildduck
- key: app.kubernetes.io/component
operator: In
values:
- wildduck
topologyKey: topology.kubernetes.io/zone
2023-08-24 16:53:07 +00:00
containers:
- name: wildduck
image: mirror.gcr.io/nodemailer/wildduck
2023-08-24 16:53:07 +00:00
ports:
- containerPort: 8080
name: wildduck-api
- containerPort: 9993
name: wildduck-mda
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
limits:
cpu: 500m
memory: 200Mi
requests:
cpu: 10m
memory: 100Mi
env:
2023-08-27 17:24:36 +00:00
- name: APPCONF_emailDomain
value: k-space.ee
- name: APPCONF_log_level
value: info
- name: APPCONF_maxForwards
value: "2000"
- name: APPCONF_hostname
value: mail.k-space.ee
2023-08-24 16:53:07 +00:00
- name: APPCONF_tls_key
value: /cert/tls.key
- name: APPCONF_tls_cert
value: /cert/tls.crt
- name: APPCONF_api_host
value: "0.0.0.0"
- name: APPCONF_api_accessToken
valueFrom:
secretKeyRef:
name: wildduck
key: WILDDUCK_API_TOKEN
- 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:
name: dragonfly-auth
key: REDIS_URI
2023-08-24 16:53:07 +00:00
volumeMounts:
- mountPath: /cert
name: cert
volumes:
- name: cert
secret:
secretName: wildduck-tls