Skip to content

Commit

Permalink
adapt configuration to changes in vault-raft-snapshot-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten Kraus authored and Karsten Kraus committed Sep 23, 2023
1 parent 581a219 commit bd1a573
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions charts/vault-raft-snapshot-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: vault-raft-snapshot-agent
type: application
version: 0.3.0
appVersion: "v0.8.0"
version: 0.4.0
appVersion: "v0.9.0"
description: Vault Raft Snapshot Agent takes periodic snapshots of Vault's Raft database and stores them on a local volume or an remote S3 bucket
keywords:
- vault-raft-snapshot-agent
Expand Down
6 changes: 3 additions & 3 deletions charts/vault-raft-snapshot-agent/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ metadata:
data:
snapshots.yaml: |-
{{- $config := deepCopy .Values.config -}}
{{- if $config.uploaders.local.enabled -}}
{{- $_ := set $config.uploaders "local" (pick $config.uploaders.local "path") -}}
{{- if $config.snapshots.storages.local.enabled -}}
{{- $_ := set $config.snapshots.storages "local" (pick $config.snapshots.storages.local "path") -}}
{{- else -}}
{{- $_ := unset $config.uploaders "local" -}}
{{- $_ := unset $config.snapshots.storages "local" -}}
{{- end -}}
{{- toYaml $config | nindent 4 -}}
8 changes: 4 additions & 4 deletions charts/vault-raft-snapshot-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ spec:
- mountPath: /etc/vault.d/
name: config
readOnly: true
{{- if .Values.config.uploaders.local.enabled }}
- mountPath: {{ .Values.config.uploaders.local.path }}
{{- if .Values.config.snapshots.storages.local.enabled }}
- mountPath: {{ .Values.config.snapshots.storages.local.path }}
name: snapshots
{{- end }}
{{- range $volume := .Values.deployment.extraVolumes }}
Expand All @@ -67,9 +67,9 @@ spec:
- name: config
configMap:
name: {{ include "vault-raft-snapshot-agent.fullname" . }}
{{- if .Values.config.uploaders.local.enabled }}
{{- if .Values.config.snapshots.storages.local.enabled }}
- name: snapshots
{{- with .Values.config.uploaders.local.volume }}
{{- with .Values.config.snapshots.storages.local.volume }}
{{- if .persistentVolumeClaim }}
persistentVolumeClaim:
claimName: {{ include "vault-raft-snapshot-agent.fullname" $ }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $localUploader := .Values.config.uploaders.local -}}
{{- $localUploader := .Values.config.snapshots.storages.local -}}
{{- if and $localUploader.enabled (default false (dig "volume" "persistentVolumeClaim" dict $localUploader).create) -}}
{{- $pvc := $localUploader.volume.persistentVolumeClaim -}}
---
Expand Down
28 changes: 14 additions & 14 deletions charts/vault-raft-snapshot-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ config:
snapshots:
frequency: 1h
retain: 72
uploaders:
local:
# -- Enables/disables the local storage of snaphots.
# If disabled the corresponding volume and volume-mounts will not be created
enabled: true
# @ignored
path: /vault/snapshots
# -- Defines the kind of volume used to store the snapshots locally.
# If you specify `persistentVolumeClaim` the chart can generate the
# PVC for you. Just specify the claim as you would [normally do](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes)
# and add the property `create: true` and the relevant properties of your [PersistentVolumeClaimSpec]()
# as key of `persistentVolumeClaim`.
volume:
emptyDir: {}
storages:
local:
# -- Enables/disables the local storage of snaphots.
# If disabled the corresponding volume and volume-mounts will not be created
enabled: true
# @ignored
path: /vault/snapshots
# -- Defines the kind of volume used to store the snapshots locally.
# If you specify `persistentVolumeClaim` the chart can generate the
# PVC for you. Just specify the claim as you would [normally do](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes)
# and add the property `create: true` and the relevant properties of your [PersistentVolumeClaimSpec]()
# as key of `persistentVolumeClaim`.
volume:
emptyDir: {}

0 comments on commit bd1a573

Please sign in to comment.