email-connect/deploy/k8s/railiance/deployment.yaml
tegwick 64d81e3169 Wave-2 right-sizing: email-connect CPU request 25m->5m (EMAIL-WP-0009)
Request only; limits and 64Mi memory unchanged.
Evidence: resource-control 2026-10-21 node budget (3d9b1bd).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 276069@bnt-lap001
Assistant-Session: 2e192b3d-b3e8-4403-94d4-d55a2c8b476c
2026-10-21 23:59:51 +02:00

117 lines
3.8 KiB
YAML

# email-connect transactional receiver — railiance01 (EMAIL-WP-0004-T03).
#
# Conventions match audit-core / user-engine: digest-pinned image from
# forgejo.coulomb.social, non-root, read-only root, probes on named http port.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: email-connect
namespace: email-connect
labels:
app.kubernetes.io/name: email-connect
app.kubernetes.io/part-of: email-connect
annotations:
email-connect.railiance.io/rollback-note: >-
SQLite schema is additive. Preserve deliveries and send_attempts.
Stop delivery and reconcile any in_flight reservations before reverting.
Preserve scoped caller admission and both caller projections. The retired
legacy ingest bearer must never be restored or used for rollback.
spec:
replicas: 1
revisionHistoryLimit: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app.kubernetes.io/name: email-connect
template:
metadata:
labels:
app.kubernetes.io/name: email-connect
app.kubernetes.io/part-of: email-connect
spec:
serviceAccountName: email-connect
securityContext:
runAsNonRoot: true
fsGroup: 10001
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 15
containers:
- name: email-connect
# Scoped original user-engine caller and compatible legacy evidence adoption.
image: forgejo.coulomb.social/coulomb/email-connect@sha256:5d79fd1fec15d3a279383820f170d263de3a55f5308df01a0a34732ebaea6d3d
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
envFrom:
- configMapRef:
name: email-connect-config
- secretRef:
name: email-connect-runtime
optional: false
env:
- name: EMAIL_CONNECT_CALLERS_FILE
value: /etc/email-connect-callers/callers.json
resources:
requests:
cpu: 5m
memory: 64Mi
limits:
cpu: 250m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
volumeMounts:
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
- name: caller-policy
mountPath: /etc/email-connect-callers
readOnly: true
- name: caller-credentials
mountPath: /var/run/secrets/email-connect-callers
readOnly: true
startupProbe:
httpGet: {path: /healthz, port: http}
periodSeconds: 3
failureThreshold: 20
readinessProbe:
httpGet: {path: /readyz, port: http}
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
livenessProbe:
httpGet: {path: /healthz, port: http}
periodSeconds: 20
timeoutSeconds: 2
failureThreshold: 3
volumes:
- name: data
persistentVolumeClaim:
claimName: email-connect-data
- name: tmp
emptyDir: {}
- name: caller-policy
configMap:
name: email-connect-callers-user-engine-276257849bf2
defaultMode: 0444
- name: caller-credentials
secret:
secretName: email-connect-caller-user-engine
defaultMode: 0440
items:
- key: token
path: user-engine