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

feat: PVC configurable through values.yml #1083

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 8 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ storage might be desired by the user.
volumeClaimTemplates:
{{- if and (eq (.Values.server.dataStorage.enabled | toString) "true") (or (eq .mode "standalone") (eq (.Values.server.ha.raft.enabled | toString ) "true" )) }}
- metadata:
name: data
name: {{ .Values.server.dataStorage.name | default "data" }}
{{- include "vault.dataVolumeClaim.annotations" . | nindent 6 }}
{{- include "vault.dataVolumeClaim.labels" . | nindent 6 }}
spec:
Expand All @@ -299,10 +299,13 @@ storage might be desired by the user.
{{- if .Values.server.dataStorage.storageClass }}
storageClassName: {{ .Values.server.dataStorage.storageClass }}
{{- end }}
{{- if .Values.server.dataStorage.volumeName }}
volumeName: {{ .Values.server.dataStorage.volumeName | quote }}
{{- end }}
{{ end }}
{{- if eq (.Values.server.auditStorage.enabled | toString) "true" }}
- metadata:
name: audit
name: {{ .Values.server.auditStorage.name | default "audit" }}
{{- include "vault.auditVolumeClaim.annotations" . | nindent 6 }}
{{- include "vault.auditVolumeClaim.labels" . | nindent 6 }}
spec:
Expand All @@ -314,6 +317,9 @@ storage might be desired by the user.
{{- if .Values.server.auditStorage.storageClass }}
storageClassName: {{ .Values.server.auditStorage.storageClass }}
{{- end }}
{{- if .Values.server.auditStorage.volumeName }}
volumeName: {{ .Values.server.auditStorage.volumeName | quote }}
{{- end }}
{{ end }}
{{ end }}
{{- end -}}
Expand Down
12 changes: 12 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,12 @@
"auditStorage": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"volumeName": {
"type": "string"
},
"accessMode": {
"type": "string"
},
Expand Down Expand Up @@ -673,6 +679,12 @@
"dataStorage": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"volumeName": {
"type": "string"
},
"accessMode": {
"type": "string"
},
Expand Down
8 changes: 8 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,8 @@ server:
# See https://developer.hashicorp.com/vault/docs/configuration/storage to know more
dataStorage:
enabled: true
# Name of the PVC to create
name: "data"
# Size of the PVC created
size: 10Gi
# Location where the PVC will be mounted.
Expand All @@ -778,6 +780,8 @@ server:
annotations: {}
# Labels to apply to the PVC
labels: {}
# Volume name
volumeName: ""

# Persistent Volume Claim (PVC) retention policy
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
Expand All @@ -794,6 +798,8 @@ server:
# See https://developer.hashicorp.com/vault/docs/audit to know more
auditStorage:
enabled: false
# Name of the PVC to create
name: "audit"
# Size of the PVC created
size: 10Gi
# Location where the PVC will be mounted.
Expand All @@ -807,6 +813,8 @@ server:
annotations: {}
# Labels to apply to the PVC
labels: {}
# Volume name
volumeName: ""

# Run Vault in "dev" mode. This requires no further setup, no state management,
# and no initialization. This is useful for experimenting with Vault without
Expand Down
Loading