Expand (and explicitly specify storageclass of) Vault storage

Due to currently-unknown fault, my Vault storage got full up (I
_suspect_ it's due to not setting a default TTL on Tokens, and so they
all hung around. Surprised they were created at such a rate, but w/e). I
wasn't able to directly expand the volume - and, anyway, it's on
Longhorn which is a Storage Provisioner that I'm moving away from - so
the solution was to:
* Create a temporary PV (on FreeNas, though that doesn't actually
  matter) and copy data onto it (by mounting both it and the existing
  Volume onto a debug pod, using a variant of [this
  script](https://blog.scubbo.org/posts/pvc-debug-pod/))
* Delete the existing PVC and PV
* Make this update, and sync
  * A new _empty_ PV will be created (and probably populated with some
    stuff)
* Scale-down the StatefulSet, do the double-mount-to-debug-pod trick
  again, and copy data from the temporary PV onto this one
* Delete Debug Pod, re-scale-up StatefulSet...and hope that there's
  nothing stateful in the data which means that copying it from one
  volume to another makes it invalid (e.g. if encrypted with an
  encryption key which would change on a new spin-up of the pod - which
  _seems_ unlikely, but 🤷)
This commit is contained in:
Jack Jackson 2024-06-04 14:07:45 -07:00
parent e798564692
commit 496c2f13b0

View File

@ -351,6 +351,9 @@ spec:
hosts:
- host: vault.avril
paths: []
dataStorage:
size: 20Gi
storageClass: freenas-iscsi-csi
destination:
server: "https://kubernetes.default.svc"