Open uladzimir-tryputska opened 7 months ago
Spilo is using WALG_AZ_PREFIX environment variable as an indicator, that Azure cloud provider should be used for backups https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L865
It makes usage of the default WALG_AZ_PREFIX value not possible https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L898
Without default WALG_AZ_PREFIX it is not possible to use cluster uid in the bucket path names. https://github.com/zalando/postgres-operator/issues/2227
AWS and GCP setup allows usage of the default WALG_PREFIX, because WALG_PREFIX is not mandatory and other variables can be used to enable backups, like here https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L898
I would suggest to add more checks here https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L898, like elif wale.get("WALG_AZ_PREFIX") or wale.get("AZURE_STORAGE_ACCOUNT") or ... :
elif wale.get("WALG_AZ_PREFIX") or wale.get("AZURE_STORAGE_ACCOUNT") or ... :
I am also facing this issue
Spilo is using WALG_AZ_PREFIX environment variable as an indicator, that Azure cloud provider should be used for backups https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L865
It makes usage of the default WALG_AZ_PREFIX value not possible https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L898
Without default WALG_AZ_PREFIX it is not possible to use cluster uid in the bucket path names. https://github.com/zalando/postgres-operator/issues/2227
AWS and GCP setup allows usage of the default WALG_PREFIX, because WALG_PREFIX is not mandatory and other variables can be used to enable backups, like here https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L898
I would suggest to add more checks here https://github.com/zalando/spilo/blob/3.2-p1/postgres-appliance/scripts/configure_spilo.py#L898, like
elif wale.get("WALG_AZ_PREFIX") or wale.get("AZURE_STORAGE_ACCOUNT") or ... :