mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 13:52:58 +00:00
Use backup_pvc for custom backup PVC name in templates When backup_pvc is specified with create_backup_pvc: true, the PVC template and ownerReference removal used the hardcoded default name (deployment_name-backup-claim) instead of the user-specified name. This caused the management pod to reference a PVC that didn't exist. Replace backup_claim variable with backup_pvc throughout the backup role so the resolved PVC name is used consistently in all templates. Authored By: Adam Knochowski <aknochow@redhat.com> Assisted By: Claude
19 lines
497 B
Django/Jinja
19 lines
497 B
Django/Jinja
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ backup_pvc }}
|
|
namespace: "{{ backup_pvc_namespace }}"
|
|
ownerReferences: null
|
|
labels:
|
|
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
{% if backup_storage_class is defined %}
|
|
storageClassName: {{ backup_storage_class }}
|
|
{% endif %}
|
|
resources:
|
|
requests:
|
|
storage: {{ backup_storage_requirements | default('5Gi', true) }}
|