From cf3245473a09ae1841e4043378e9cfc7205d4c9c Mon Sep 17 00:00:00 2001 From: guerzon Date: Thu, 22 Aug 2024 19:11:41 +0800 Subject: [PATCH] feat: volume improvements (#109) * feat: pvc access mode, namespace * chore: update funding --- .github/FUNDING.yml | 2 ++ charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/templates/_pvcSpec.tpl | 4 ++-- charts/vaultwarden/templates/pvc.yaml | 1 + charts/vaultwarden/values.yaml | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index dd67961..7a75227 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,3 @@ github: guerzon +liberapay: guerzon +custom: ["https://paypal.me/ilesterg"] diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index 11515d5..0949068 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - name: guerzon email: guerzon@proton.me url: https://github.com/guerzon -version: 0.24.0 +version: 0.24.1 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/templates/_pvcSpec.tpl b/charts/vaultwarden/templates/_pvcSpec.tpl index 90d4f0c..b5bed55 100644 --- a/charts/vaultwarden/templates/_pvcSpec.tpl +++ b/charts/vaultwarden/templates/_pvcSpec.tpl @@ -16,7 +16,7 @@ volumeClaimTemplates: {{- end }} spec: accessModes: - - "ReadWriteOnce" + - {{ .accessMode | quote }} resources: requests: storage: {{ .size }} @@ -39,7 +39,7 @@ volumeClaimTemplates: {{- end }} spec: accessModes: - - "ReadWriteOnce" + - {{ .accessMode | quote }} resources: requests: storage: {{ .size }} diff --git a/charts/vaultwarden/templates/pvc.yaml b/charts/vaultwarden/templates/pvc.yaml index e38380c..621b25d 100644 --- a/charts/vaultwarden/templates/pvc.yaml +++ b/charts/vaultwarden/templates/pvc.yaml @@ -5,6 +5,7 @@ apiVersion: v1 kind: PersistentVolumeClaim {{- $newName := printf "%s-%s-0" $pvc.metadata.name $.Release.Name }} {{- $newPvc := merge (dict "metadata" (dict "name" $newName)) $pvc }} +{{- $newPvc := merge (dict "metadata" (dict "namespace" $.Release.Namespace)) $newPvc }} {{ $newPvc | toYaml }} {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index 845468b..4a14272 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -236,6 +236,7 @@ data: {} # class: "" # path: "/data" # keepPvc: false + # accessMode: "ReadWriteOnce" ## @param attachments Attachments directory configuration, refer to values.yaml for parameters. ## By default, attachments/ is located inside the data directory. @@ -246,6 +247,7 @@ attachments: {} # class: "" # path: /files # keepPvc: false + # accessMode: "ReadWriteOnce" ## @param webVaultEnabled Enable Web Vault ##