Skip to content

No support for path-style S3 URI addressing (--repo-s3-uri-style=path) #76

Description

@sj-robert

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:

  1. Deploy pgbackrest plgin with an S3 compatbile endpoint
  2. Set endpointURL to an internal cluster service https://minio-service.defaut.svc.cluster.local:9000
  3. Trigger a stanza-create (1st backup)
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions