aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-01-06 07:14:16 +0000
committerterminaldweller <thabogre@gmail.com>2022-01-06 07:14:16 +0000
commite4f20fe9c17bb9802560121fe96234df31022636 (patch)
tree5b5b2db03d807a39887f851dbabc45339ce3a3d2 /kubernetes
parentfix (diff)
downloadscripts-e4f20fe9c17bb9802560121fe96234df31022636.tar.gz
scripts-e4f20fe9c17bb9802560121fe96234df31022636.zip
added vaultwarden
Diffstat (limited to 'kubernetes')
-rwxr-xr-xkubernetes/vaultwarden/deploy.sh4
-rw-r--r--kubernetes/vaultwarden/vaultwarden-data-volume.yaml12
-rw-r--r--kubernetes/vaultwarden/vaultwarden-deployment.yaml43
3 files changed, 59 insertions, 0 deletions
diff --git a/kubernetes/vaultwarden/deploy.sh b/kubernetes/vaultwarden/deploy.sh
new file mode 100755
index 0000000..3eb49e5
--- /dev/null
+++ b/kubernetes/vaultwarden/deploy.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+kubectl apply -f ./vaultwarden-data-volume.yaml
+kubectl apply -f ./vaultwarden-deployment.yaml
diff --git a/kubernetes/vaultwarden/vaultwarden-data-volume.yaml b/kubernetes/vaultwarden/vaultwarden-data-volume.yaml
new file mode 100644
index 0000000..f6a5a61
--- /dev/null
+++ b/kubernetes/vaultwarden/vaultwarden-data-volume.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ creationTimestamp: null
+ name: vaultwarden-data
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Mi
+status: {}
diff --git a/kubernetes/vaultwarden/vaultwarden-deployment.yaml b/kubernetes/vaultwarden/vaultwarden-deployment.yaml
new file mode 100644
index 0000000..6e00e50
--- /dev/null
+++ b/kubernetes/vaultwarden/vaultwarden-deployment.yaml
@@ -0,0 +1,43 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: vaultwarden
+ labels:
+ app: vaultwarden
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: vaultwarden
+ template:
+ metadata:
+ labels:
+ app: vaultwarden
+ spec:
+ containers:
+ - name: vaultwarden
+ image: vaultwarden/server:1.23.1
+ ports:
+ - containerPort: 80
+ volumeMounts:
+ - name: vaultwarden-data
+ mountPath: /data/
+ volumes:
+ - name: vaultwarden-data
+ persistentVolumeClaim:
+ claimName: vaultwarden-data
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: vaultwarden-service
+spec:
+ selector:
+ app: vaultwarden
+ type: LoadBalancer
+ ports:
+ - protocol: TCP
+ name: "vaultwarden-80"
+ port: 27080
+ targetPort: 80
+ nodePort: 31180