apiVersion: apps/v1
kind: Deployment
metadata:
name: vaultwarden
spec:
selector:
matchLabels:
app: vaultwarden
template:
labels:
volumes:
- name: data
persistentVolumeClaim:
claimName: vaultwarden
containers:
- name: vaultwarden
image: vaultwarden
env:
- name: TZ
value: Asia/Shanghai
- name: DATABASE_URL
valueFrom:
configMapKeyRef:
key: database-url
- name: ADMIN_TOKEN
secretKeyRef:
key: admin-token
- name: DOMAIN
key: domain
- name: PASSWORD_HINTS_ALLOWED
key: password-hints-allowed
- name: SIGNUPS_ALLOWED
key: signups-allowed
- name: WEBSOCKET_ENABLED
key: websocket-enabled
resources:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "32Mi"
cpu: "100m"
ports:
- containerPort: 80
name: http
- containerPort: 3012
name: ws
volumeMounts:
- mountPath: /data
name: data