titan-iac/services/maintenance/soteria-deployment.yaml

63 lines
1.6 KiB
YAML

# services/maintenance/soteria-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: soteria
namespace: maintenance
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: soteria
template:
metadata:
labels:
app: soteria
spec:
serviceAccountName: soteria
containers:
- name: soteria
image: registry.bstein.dev/infra/soteria:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
envFrom:
- configMapRef:
name: soteria
env:
- name: SOTERIA_SECRET_NAMESPACE
value: "maintenance"
- name: SOTERIA_RESTIC_SECRET_NAME
value: "soteria-restic"
- name: SOTERIA_JOB_TTL_SECONDS
value: "86400"
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
readinessProbe:
httpGet:
path: /readyz
port: http
initialDelaySeconds: 2
periodSeconds: 5
timeoutSeconds: 2
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 65532
capabilities:
drop: ["ALL"]