Add Documentation for expanding the DB PVC of an existing AWX
Feature Summary
Often times a user will try out AWX with the default 8Gi PVC size, then surpass that DB size as their usage of AWX grows. The system job for cleaning out jobs and events can help, but may not always be enough. In this case, the user will need to expand their PostgreSQL db PVC to a larger postgres_storage_requirements size. This is currently not a very easy process, and we should document it.
It would be great to take the time to figure out the steps needed for expanding the db PVC and document them in a markdown file here in the repo. I think we would want to cover two scenarios:
-
A) How to migrate if your storageclass supports dynamic expansion (currently modify the AWX CR spec
postgres_storage_requirementssetting, then delete the StatefulSet and wait for the next reconciliation loop to re-create it) -
B) How to use the migration.md logic to migrate the awx instance to a fresh instance and provision a larger PVC in the process.
Help wanted on this one, if anyone has done this and has information to share on pitfalls they ran into, or wants to open a PR to add these docs, please chime in here! Thanks!
Additional Information
There is additional context provided here about ways in which some of this could be done automatically by the operator:
- https://github.com/ansible/awx-operator/issues/1642#issuecomment-1836742730
Hi. Just ran into an issue, that my PostgreSQL storage got full. As my pvc/pv could be resized what was sufficient was to update the size in PVC and scale down/up postgresql stateful set (no need to remove it, just the pod needed to be re-created)
I wonder - would it be possible to include this in operator, that once the postgresql storage clause is adjusted, the statefull set get scaled down to 0 and back to 1 ? Or maybe just removing all postgresql pods and let the statefull set re-create them? This would ease the upscaling of db storage, where dynamic PV sizing is allowed... What do you think?