Cut the Deployment over to the Infisical-synced Secret and switch to Recreate (SQLite/WAL on a RWO PVC must not have two writers during a roll). Applied via kubectl (not ArgoCD-managed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
deployment.kubernetes.io/revision: '2'
|
|
kubectl.kubernetes.io/last-applied-configuration: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"name":"vaultwarden","namespace":"vaultwarden"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"vaultwarden"}},"template":{"metadata":{"labels":{"app":"vaultwarden"}},"spec":{"containers":[{"env":[{"name":"LOG_LEVEL","value":"warn"},{"name":"WEBSOCKET_ENABLED","value":"true"}],"envFrom":[{"secretRef":{"name":"vaultwarden-secret"}}],"image":"vaultwarden/server:latest","name":"vaultwarden","ports":[{"containerPort":80}],"resources":{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"25m","memory":"64Mi"}},"volumeMounts":[{"mountPath":"/data","name":"data"}]}],"volumes":[{"name":"data","persistentVolumeClaim":{"claimName":"vaultwarden-pvc"}}]}}}}
|
|
|
|
'
|
|
name: vaultwarden
|
|
namespace: vaultwarden
|
|
spec:
|
|
progressDeadlineSeconds: 600
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app: vaultwarden
|
|
# Single-replica vaultwarden on a RWO local-path PVC (SQLite + WAL): Recreate
|
|
# avoids two pods briefly racing the same db.sqlite3 during a roll
|
|
# (RollingUpdate surges a 2nd pod first).
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vaultwarden
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: LOG_LEVEL
|
|
value: warn
|
|
- name: WEBSOCKET_ENABLED
|
|
value: 'true'
|
|
envFrom:
|
|
- secretRef:
|
|
name: vaultwarden-secret-infisical
|
|
image: vaultwarden/server:1.35.4
|
|
imagePullPolicy: Always
|
|
name: vaultwarden
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
requests:
|
|
cpu: 25m
|
|
memory: 64Mi
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: data
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
securityContext: {}
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: vaultwarden-pvc
|
|
|