Add automatic backup PVC creation with create_backup_pvc option (#2097)

When users specify a custom backup_pvc name, the operator now
automatically creates the PVC instead of failing with
"does not exist, please create this pvc first."

Changes:
- Add create_backup_pvc variable (default: true) to backup defaults
- Update error condition to check create_backup_pvc before failing
- Update PVC creation condition to include create_backup_pvc
- Add create_backup_pvc field to AWXBackup CRD

Users who want the previous behavior can set create_backup_pvc: false.
This commit is contained in:
aknochow
2026-02-24 16:06:24 -05:00
committed by GitHub
parent e0ce3ef71d
commit d4b295e8b4
3 changed files with 11 additions and 3 deletions

View File

@@ -8,6 +8,9 @@ api_version: '{{ deployment_type }}.ansible.com/v1beta1'
backup_pvc: ''
backup_pvc_namespace: "{{ ansible_operator_meta.namespace }}"
# If true (default), automatically create the backup PVC if it does not exist
create_backup_pvc: true
# Size of backup PVC if created dynamically
backup_storage_requirements: ''