apps/vaultwarden/vaultwarden.yaml (view raw)
1apiVersion: apps/v1
2kind: Deployment
3metadata:
4 generation: 1
5 labels:
6 app.kubernetes.io/component: vaultwarden
7 app.kubernetes.io/instance: vaultwarden
8 name: vaultwarden
9 namespace: default
10spec:
11 replicas: 1
12 selector:
13 matchLabels:
14 app.kubernetes.io/component: vaultwarden
15 app.kubernetes.io/instance: vaultwarden
16 app.kubernetes.io/name: vaultwarden
17 template:
18 metadata:
19 labels:
20 app.kubernetes.io/component: vaultwarden
21 app.kubernetes.io/instance: vaultwarden
22 app.kubernetes.io/name: vaultwarden
23 spec:
24 containers:
25 - env:
26 - name: POSTGRES_PASSWORD
27 valueFrom:
28 secretKeyRef:
29 name: postgres
30 key: postgres-password
31 - name: DATABASE_URL
32 value: "postgres://postgres:$(POSTGRES_PASSWORD)@postgres.default:5432/vaultwarden?sslmode=disable"
33 envFrom:
34 - configMapRef:
35 name: vaultwarden
36 image: docker.io/vaultwarden/server:1.32.4
37 imagePullPolicy: IfNotPresent
38 livenessProbe:
39 failureThreshold: 10
40 httpGet:
41 path: /alive
42 port: http
43 scheme: HTTP
44 initialDelaySeconds: 5
45 periodSeconds: 10
46 successThreshold: 1
47 timeoutSeconds: 1
48 name: vaultwarden
49 ports:
50 - containerPort: 8080
51 name: http
52 protocol: TCP
53 readinessProbe:
54 failureThreshold: 3
55 httpGet:
56 path: /alive
57 port: http
58 scheme: HTTP
59 initialDelaySeconds: 5
60 periodSeconds: 10
61 successThreshold: 1
62 timeoutSeconds: 1
63 volumeMounts:
64 - mountPath: /data
65 name: vaultwarden-data
66 volumes:
67 - name: vaultwarden-data
68 persistentVolumeClaim:
69 claimName: vaultwarden-data-vaultwarden-0
70---
71apiVersion: v1
72kind: Service
73metadata:
74 labels:
75 app.kubernetes.io/component: vaultwarden
76 app.kubernetes.io/instance: vaultwarden
77 app.kubernetes.io/name: vaultwarden
78 name: vaultwarden
79 namespace: default
80spec:
81 ports:
82 - name: http
83 port: 80
84 protocol: TCP
85 targetPort: 8080
86 selector:
87 app.kubernetes.io/component: vaultwarden
88 app.kubernetes.io/instance: vaultwarden
89 app.kubernetes.io/name: vaultwarden
90 type: ClusterIP