Skip to content

Commit

Permalink
fix: remove file storage block from default values (#185)
Browse files Browse the repository at this point in the history
* remove file storage block from default values

Signed-off-by: Peter Muriuki <[email protected]>

* add condition for config.json

Signed-off-by: Peter Muriuki <[email protected]>

* add defaultStorage block

Signed-off-by: Peter Muriuki <[email protected]>

---------

Signed-off-by: Peter Muriuki <[email protected]>
  • Loading branch information
MuriukiPM authored Oct 15, 2024
1 parent d5c25cc commit 3afce7d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions vault/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
data:
config.json:
{{- if .Values.vault.config.storage }}
{{ .Values.vault.config | toPrettyJson | b64enc }}
{{- else }}
{{ (merge .Values.vault.config .Values.vault.config.defaultStorage) | toPrettyJson | b64enc }}
{{- end }}
vault-config.yml:
{{ .Values.vault.externalConfig | toYaml | b64enc }}
11 changes: 8 additions & 3 deletions vault/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ vault:

# Check <https://www.vaultproject.io/docs/configuration/storage/> for supported storage backends.
# @ignored
storage:
file:
path: "/vault/file"
storage: {}
# file:
# path: "/vault/file"
#
# consul:
# address: ""
Expand All @@ -214,6 +214,11 @@ vault:
# credentials_file: ""
# ha_enabled: "true"
#
## Helm merges the default chart values under vault.config.storage with the supplied storage value when generating the config.json for vault. This causes the vault container to error out due to the multiple storage blocks. We add defaultStorage block as a workaround for now
defaultStorage:
storage:
file:
path: "/vault/file"

## @ignored
# api_addr: <http://localhost:8200>
Expand Down

0 comments on commit 3afce7d

Please sign in to comment.