When using the plugin with s3-compatible object stores (here: MinIO, but also StorageGRID) hosted at internal cluster endpoints, pgbacrest defaults to virtual-hosted style URI addressing. This constructs hostnames like <bucket>.endpoint> (e.g. dev-pgbackrest.minio-service.default.svc.cluster.local), which do not resolve in our cluster DNS setup.
pgbackrest supports path-style addressing via --repo1-s3-uri-style=path, which avoids this issue by keeping the bucket name in the URL path rather than the hostname. However, the Archive CRD doesn't expose this option, forcing DNS workarounds.
Steps to reproduce:
- Deploy pgbackrest plgin with an S3 compatbile endpoint
- Set
endpointURL to an internal cluster service https://minio-service.defaut.svc.cluster.local:9000
- Trigger a stanza-create (1st backup)
- error:
unable to get address for '<bucket>.<endpoint>': [-2] Name or service not known
Expected behavior:
The Archive CRD should expose a uriStyle field or similar, on the repository configuration, which would allow users to set path-style addressing for non-AWS s3 endpoints.
Workaround:
Add a CoreDNS rewrite rule to resolve <bucket>.<endpoint> to the MinIO service IP.
Environment:
- cnpg-plugin-pgbackrest: v0.5.2
- CloudNativePG: 1.29.0
- Object store: MinIO (internal cluster service over HTTPS)
When using the plugin with s3-compatible object stores (here: MinIO, but also StorageGRID) hosted at internal cluster endpoints, pgbacrest defaults to virtual-hosted style URI addressing. This constructs hostnames like
<bucket>.endpoint>(e.g.dev-pgbackrest.minio-service.default.svc.cluster.local), which do not resolve in our cluster DNS setup.pgbackrest supports path-style addressing via
--repo1-s3-uri-style=path, which avoids this issue by keeping the bucket name in the URL path rather than the hostname. However, theArchiveCRD doesn't expose this option, forcing DNS workarounds.Steps to reproduce:
endpointURLto an internal cluster servicehttps://minio-service.defaut.svc.cluster.local:9000unable to get address for '<bucket>.<endpoint>': [-2] Name or service not knownExpected behavior:
The
ArchiveCRD should expose a uriStyle field or similar, on the repository configuration, which would allow users to set path-style addressing for non-AWS s3 endpoints.Workaround:
Add a CoreDNS rewrite rule to resolve
<bucket>.<endpoint>to the MinIO service IP.Environment: