chart: PVC whenDeleted=Delete (no more leaked pgdata on instance delete)
This commit is contained in:
@@ -7,6 +7,17 @@ metadata:
|
||||
spec:
|
||||
serviceName: {{ include "instance.fullname" . }}-pg
|
||||
replicas: 1
|
||||
# When the StatefulSet is deleted (e.g. ArgoCD prunes the
|
||||
# Application after an instance is deleted from Tower), drop the
|
||||
# PVCs too. Without this, K8s preserves the PVC for "data safety"
|
||||
# — but in v3's model an instance delete IS a clean wipe, and
|
||||
# leaking the PVC means a same-named recreate mounts the old PG
|
||||
# data dir whose pg_authid carries the previous password. db-init
|
||||
# then fails password auth even though the new K8s Secret has the
|
||||
# correct hash. Setting Delete here prevents that whole class.
|
||||
persistentVolumeClaimRetentionPolicy:
|
||||
whenDeleted: Delete
|
||||
whenScaled: Retain
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Values.instance.code | quote }}
|
||||
|
||||
Reference in New Issue
Block a user