openstack-armada-app/python3-k8sapp-openstack
Romulo Leite 2530143ba7 Enable backup restore procedure on FluxCD App
The OpenStack application can be backed-up when it is applied and the
platform backup ansible playbook is executed [1]. The restore procedure
though was heavily based on Armada Operator specific features that are
not literally transcribed to the Kustomize Operator.

This change implements the required functions to select Helm Releases
of a given FluxCD application to be installed, using both the
helmrelease_resource_map and helmrelease_cleanup attributes that are
already in place for FluxCDKustomizeOperator [2].

With those methods in place, the OpenStack application Restore procedure
[3] can be now used to restore backups on our FluxCD based application,
still relying on the sequence of 'system application-apply' specific
modes.

[1] https://docs.starlingx.io/developer_resources/backup_restore.html#backing-up
[2] https://review.opendev.org/c/starlingx/config/+/845155
[3] https://docs.starlingx.io/developer_resources/backup_restore.html#openstack-application-backup-and-restore

TEST PLAN:
PASS - Build python3-k8sapp-openstack package
PASS - Build stx-openstack-helm-fluxcd package
PASS - Build stx-openstack application tarball
PASS - Upload/Apply stx-openstack (normal mode)
PASS - Apply stx-openstack following the restore procedure modes
sequence: restore_db, restore_storage, normal
PASS - Backup a previously applied stx-openstack and restore it

Story: 2010560
Task: 47737

Signed-off-by: Romulo Leite <romulo.leite@windriver.com>
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: I1de479086057aed2fc56650e646bf7bbc3ef6510
2023-05-26 16:30:50 -03:00
..