From 6d526432888a7361c460d974fa52acb430759c2d Mon Sep 17 00:00:00 2001 From: Vladimir Pankin <55059051+reyvonger@users.noreply.github.com> Date: Mon, 11 Aug 2025 06:07:22 +0300 Subject: [PATCH] Add extraVolumes and extraVolumeMounts (#164) --- charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/templates/_podSpec.tpl | 13 +++++++++---- charts/vaultwarden/values.yaml | 8 ++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index b71f683..82d3b18 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.33.0 +version: 0.34.0 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/templates/_podSpec.tpl b/charts/vaultwarden/templates/_podSpec.tpl index ee58ed0..d92527f 100644 --- a/charts/vaultwarden/templates/_podSpec.tpl +++ b/charts/vaultwarden/templates/_podSpec.tpl @@ -151,9 +151,12 @@ containers: - containerPort: 8080 name: http protocol: TCP + volumeMounts: + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.storage.existingVolumeClaim }} {{- with .Values.storage.existingVolumeClaim }} - volumeMounts: - name: vaultwarden-data mountPath: {{ default "/data" .dataPath }} - name: vaultwarden-data @@ -161,7 +164,6 @@ containers: {{- end }} {{- else }} {{- if or (.Values.storage.data) (.Values.storage.attachments) }} - volumeMounts: {{- with .Values.storage.data }} - name: {{ .name }} mountPath: {{ default "/data" .path }} @@ -214,9 +216,12 @@ containers: {{- with .Values.sidecars }} {{- toYaml . | nindent 2 }} {{- end }} +volumes: +{{- with .Values.extraVolumes }} +{{- toYaml . | nindent 2 }} +{{- end }} {{- if .Values.storage.existingVolumeClaim }} {{- with .Values.storage.existingVolumeClaim }} -volumes: - name: vaultwarden-data persistentVolumeClaim: claimName: {{ .claimName }} @@ -229,4 +234,4 @@ serviceAccountName: {{ .Values.serviceAccount.name }} imagePullSecrets: {{- toYaml . | nindent 2 }} {{- end }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index cee2a5f..6799af4 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -89,6 +89,14 @@ initContainers: [] ## sidecars: [] +## @param extraVolumes Optionally specify extra list of additional volumes +## +extraVolumes: [] + +## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts +## +extraVolumeMounts: [] + ## @param nodeSelector Node labels for pod assignment ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector ##