feat: introduce WAL archive volume
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2781171804
I have made some minor changes in the preferred location. I suggest that the "pg_wal" volume is a sibling of the PGDATA one. What is missing now is the invocation of the initdb parameter with --waldir option (see https://www.postgresql.org/docs/current/app-initdb.html)
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2782889739
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2783635174
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2785051386
I think we need to improve the DetectPVCs function too, because we can't reattach a PVC of a data directory if we don't have the corresponding WAL volume.
$ k get pvc -w
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
cluster-example-1 Bound pvc-a419cd79-d644-4234-82fa-fd3f6dacdd14 1Gi RWO standard 4s
pg-wal-cluster-example-1 Bound pvc-4e07f615-f3ac-4d08-bff1-d935e09c9cec 1Gi RWO standard 4s
cluster-example-1 Bound pvc-a419cd79-d644-4234-82fa-fd3f6dacdd14 1Gi RWO standard 11s
I think our users are used to have the resources created by Cluster having the same prefix. This is what happens usually in Kubernetes.
Perhaps we could have cluster-example-1-wal as a name, instead of pg-wal-cluster-example-1
We should think about the meaning of the DanglingPVC, ResizingPVC, InitializingPVC, HealthyPVC fields too.
In this moment ResizingPVC is considering the WAL PVCs too, while the other ones are not including it.
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2795289801
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2797278319
/test
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2803610447
/test
@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2833398328