76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: vaultwarden
|
|
namespace: vaultwarden
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
# SQLite on a RWO volume - never run two pods against it.
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: vaultwarden
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vaultwarden
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: vaultwarden
|
|
# Pinned deliberately: this migration should not also be an upgrade.
|
|
image: vaultwarden/server:1.37.0
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
env:
|
|
- name: DOMAIN
|
|
value: https://vault.aleshym.co
|
|
# config.json used to override these; both keys were removed from it
|
|
# during the migration so the Deployment is the source of truth.
|
|
- name: SIGNUPS_ALLOWED
|
|
value: "false"
|
|
- name: INVITATIONS_ALLOWED
|
|
value: "false"
|
|
- name: ADMIN_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: vaultwarden-secret
|
|
key: ADMIN_TOKEN
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /alive
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /alive
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
resources:
|
|
requests:
|
|
cpu: 25m
|
|
memory: 96Mi
|
|
limits:
|
|
memory: 512Mi
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: vaultwarden-data
|