As such, this PR allows customizing the prefix used by Statefulset to generate the PVC names.
Tested against production with the following helmfile diff:
persistence:
- storageClass: managed-csi-premium-retain
+ enabled: true
+ size: 32
+ storageClass: statically-provisionned
+ # Deterministic name - https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/preexisting-pd#pv_to_statefulset
+ # to ensure the Terraform-managed PV can specify `claimRef`with the full generated name
+ claimPrefix: data
While working on https://github.com/jenkins-infra/helpdesk/issues/3837, we've been stucked with specifying existing PV for the ACP statefulset.
See https://github.com/jenkins-infra/azure/pull/775#issuecomment-2210796493
As per https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/preexisting-pd#pv_to_statefulset, we can determine the name of the PVCs in advance so we can specify the binding PV <-> PVC on the PV side (in Terraform) using the
claimRef
attribute.As such, this PR allows customizing the prefix used by Statefulset to generate the PVC names.
Tested against production with the following
helmfile diff
: