Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional Storage options #19

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ maintainers:
- name: Lester Guerzon
email: [email protected]
url: https://github.com/guerzon
version: 0.5.0
version: 0.6.0
2 changes: 2 additions & 0 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ data:
SIGNUPS_DOMAINS_WHITELIST: {{ .Values.signupDomains | quote }}
SIGNUPS_VERIFY: {{ .Values.signupsVerify | quote }}
WEB_VAULT_ENABLED: {{ .Values.webVaultEnabled | quote }}
LOG_FILE: {{ .Values.logging.logfile | quote }}
LOG_LEVEL: {{ .Values.logging.loglevel | quote }}
15 changes: 13 additions & 2 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,27 @@ spec:
{{- if .Values.sidecars }}
{{- toYaml .Values.sidecars | nindent 8 }}
{{- end }}
{{- if .Values.storage.existingVolumeClaim }}
volumes:
- name: vaultwarden-data
persistentVolumeClaim:
claimName: {{ .Values.storage.existingVolumeClaim }}
{{- end }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- end }}
{{- if .Values.storage.enabled }}
{{- if and .Values.storage.enabled (not .Values.storage.existingVolumeClaim) }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
volumeClaimTemplates:
- metadata:
name: vaultwarden-data
spec:
accessModes:
- "ReadWriteOnce"
{{- range .Values.storage.accessModes }}
- {{ . }}
{{- end }}
resources:
requests:
storage: {{ .Values.storage.size }}
Expand Down
23 changes: 20 additions & 3 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ ingress:
##
nginxAllowList: ""
## TODO:
## - Add support for using cert-manager.
## - Support for multiple TLS hostnames.
##
## - Add support for using cert-manager.
## - Support for multiple TLS hostnames.
##

## Service configuration
service:
Expand Down Expand Up @@ -218,9 +218,16 @@ smtp:
## @section Storage Configuration
##
storage:
## @param storage.existingVolumeClaim Name of an existing volume claim created separately, which the statefulset will use instead of creating its own
## If this is not an empty string, the other values below are ignored
##
existingVolumeClaim: ""
## @param storage.enabled Enable configuration for persistent storage
##
enabled: false
## @param storage.enabled Enable configuration for persistent storage
##
accessModes: ["ReadWriteOnce"]
## @param storage.size Storage size for /data
##
size: "15Gi"
Expand All @@ -231,6 +238,16 @@ storage:
##
dataDir: "/data"

## @section Logging Configuration
##
logging:
## @param logging.logfile Specify logfile path for output log
##
logfile: "/data/vaultwarden.log"
## @param logging.loglevel Specify the log level
##
loglevel: "warn"

## @section Extra containers Configuration
##

Expand Down