Skip to content

Commit

Permalink
fix(hashicorp#981) provide declarative parameters for volumeClaimTemp…
Browse files Browse the repository at this point in the history
…lates

Provide a default implementation for volumeClaimTemplates when applying resources with server side apply

See hashicorp#981
  • Loading branch information
thomaspetit committed Nov 27, 2023
1 parent 50f7439 commit c193aaf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ storage might be desired by the user.
{{- if and (ne .mode "dev") (or .Values.server.dataStorage.enabled .Values.server.auditStorage.enabled) }}
volumeClaimTemplates:
{{- if and (eq (.Values.server.dataStorage.enabled | toString) "true") (or (eq .mode "standalone") (eq (.Values.server.ha.raft.enabled | toString ) "true" )) }}
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
{{- include "vault.dataVolumeClaim.annotations" . | nindent 6 }}
{{- include "vault.dataVolumeClaim.labels" . | nindent 6 }}
Expand All @@ -301,7 +303,9 @@ storage might be desired by the user.
{{- end }}
{{ end }}
{{- if eq (.Values.server.auditStorage.enabled | toString) "true" }}
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: audit
{{- include "vault.auditVolumeClaim.annotations" . | nindent 6 }}
{{- include "vault.auditVolumeClaim.labels" . | nindent 6 }}
Expand Down

0 comments on commit c193aaf

Please sign in to comment.