bank-vaults / vault-operator

Kubernetes operator for Hashicorp Vault
https://bank-vaults.dev/docs/operator/
Apache License 2.0
54 stars 21 forks source link

Init container config-templating failing due to permission issue while restoring the backup from velero #431

Closed smarimus closed 2 weeks ago

smarimus commented 3 months ago

Preflight Checklist

Operator Version

1.21.2

Installation Type

Official Helm chart

Bank-Vaults Version

No response

Kubernetes Version

1.25.9

Kubernetes Distribution/Provisioner

RKE2

Expected Behavior

I'm backing up the vault resource and restoring using velero and restic.

The backup operation is successful The restore operation is giving the below exception.

`λ k logs vault-0 config-templating

time="2024-04-12T19:09:02Z" level=fatal msg="error writing template file \"/vault/config/vault.json\": open /vault/config/vault.json: permission denied"`

Actual Behavior

Should be able to restore the backup from velero. Looks like there's no option to provide security context. https://github.com/bank-vaults/vault-operator/blob/d95312400fee4a29ec6234ab23e9a90ff5906c1c/pkg/controller/vault/vault_controller.go#L1295

Steps To Reproduce

No response

Configuration

No response

Logs

λ k logs vault-0 config-templating

time="2024-04-12T19:09:02Z" level=fatal msg="error writing template file \"/vault/config/vault.json\": open /vault/config/vault.json: permission denied"

Additional Information

No response

github-actions[bot] commented 1 month ago

Thank you for your contribution! This issue has been automatically marked as stale because it has no recent activity in the last 60 days. It will be closed in 20 days, if no further activity occurs. If this issue is still relevant, please leave a comment to let us know, and the stale label will be automatically removed.

github-actions[bot] commented 2 weeks ago

This issue has been marked stale for 20 days, and is now closed due to inactivity. If the issue is still relevant, please re-open this issue or file a new one. Thank you!