-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvaultwarden.yaml
112 lines (111 loc) · 2.08 KB
/
vaultwarden.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
apiVersion: v1
kind: Namespace
metadata:
name: vaultwarden
#---
#apiVersion: v1
#kind: PersistentVolumeClaim
#metadata:
# name: vaultwarden-pv
# namespace: vaulwarden
# labels:
# app: vaultwarden
#spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 4Gi
---
apiVersion: v1
kind: Service
metadata:
name: vaultwarden-headless
namespace: vaultwarden
labels:
app: vaultwarden
spec:
ports:
- port: 80
name: web
clusterIP: None
selector:
app: vaultwarden
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: vaultwarden
namespace: vaultwarden
spec:
serviceName: "vaulwarden-headless"
replicas: 1
selector:
matchLabels:
app: vaultwarden
template:
metadata:
labels:
app: vaultwarden
spec:
containers:
- name: vaultwarden
image: vaultwarden/server:latest
volumeMounts:
- name: vw-data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: vw-data
namespace: vaultwarden
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: vaultwarden-app
namespace: vaultwarden
spec:
entryPoints:
- websecure
routes:
- match: Host(`vault.local.com`)
kind: Rule
services:
- name: vaultwarden-headless
port: 80
tls:
certResolver: pebble
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: https-redirect-scheme
namespace: vaultwarden
spec:
redirectScheme:
scheme: https
permanent: true
port: "443"
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: vaultwarden-app-http
namespace: vaultwarden
spec:
entryPoints:
- web
routes:
- match: Host(`vault.local.com`)
kind: Rule
middlewares:
- name: https-redirect-scheme
services:
- name: vaultwarden-headless
port: 80