diff --git a/manifests/database.yaml b/manifests/database.yaml index ae24be9..8d7c3c9 100644 --- a/manifests/database.yaml +++ b/manifests/database.yaml @@ -3,8 +3,9 @@ kind: Cluster metadata: name: vaultwarden-db namespace: vaultwarden + spec: - instances: 1 + instances: 2 storage: size: 1Gi @@ -28,3 +29,25 @@ spec: limits: cpu: 500m memory: 500Mi + + backup: + barmanObjectStore: + destinationPath: s3://cluster-example-full-backup + endpointURL: http://10.10.0.32:9000 + s3Credentials: + accessKeyId: + name: backup-creds + key: ACCESS_KEY_ID + secretAccessKey: + name: backup-creds + key: ACCESS_SECRET_KEY + region: + name: backup-creds + key: REGION + wal: + compression: gzip + data: + compression: gzip + immediateCheckpoint: false + jobs: 2 + retentionPolicy: "30d" diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 7589574..f1bbddf 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -4,7 +4,7 @@ metadata: name: vaultwarden namespace: vaultwarden spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: vaultwarden diff --git a/manifests/kustomization.yaml b/manifests/kustomization.yaml index 19b7aaf..93c987f 100644 --- a/manifests/kustomization.yaml +++ b/manifests/kustomization.yaml @@ -7,4 +7,5 @@ resources: - database.yaml - service.yaml - ingress.yaml + - pvc.yaml - deployment.yaml diff --git a/manifests/pvc.yaml b/manifests/pvc.yaml new file mode 100644 index 0000000..14d276d --- /dev/null +++ b/manifests/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: vaultwarden-pvc + namespace: vaultwarden +spec: + accessModes: + - ReadWriteMany + storageClassName: redundant-storage-class + resources: + requests: + storage: 1Gi