plugin-barman-cloud icon indicating copy to clipboard operation
plugin-barman-cloud copied to clipboard

[feature request] Allow specifying namespace of Barman ObjectStore CR

Open poehlerflorian opened this issue 10 months ago • 2 comments

Currently, the ObjectStore referenced in a Cluster has to be in the same namespace. It would be helpful to be able to specify a namespace where the ObjectStore should be fetched from.

This can have security implications and there should probably a mechanism to enable or disable the access from a different namespace. This could be a flag in the ObjectStore itself.

e.g.:

---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: test-cluster
  namespace: cluster-namespace
spec:
  instances: 3
  plugins:
    - name: barman-cloud.cloudnative-pg.io
      isWALArchiver: true
      parameters:
        barmanObjectName: s3-store
        barmanObjectNamespace: cnpg-system # Add the namespace here
---
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
  name: s3-store
  namespace: cnpg-system
spec:
  configuration:
    destinationPath: <destination>
    endpointURL: <endpoint>
    s3Credentials: <s3Credentials>
    # Configure namespace access
    allowAccessFromNamespace: true
    # Maybe allow explicitly specifying the namespace(s):
    allowAccessFromNamespaces:
      - cluster-namespace

poehlerflorian avatar Jan 20 '26 15:01 poehlerflorian

@dosu, is there any update

beingvishalt avatar Jan 30 '26 12:01 beingvishalt

There’s no update yet—cross-namespace ObjectStore referencing (like specifying a barmanObjectNamespace or allowing access from other namespaces) is not currently supported. All ObjectStore and secret resources must be in the same namespace as the Cluster. There’s an open feature request for this capability and strong community interest, but no implementation or ETA at this time. The current best practice is to automate duplication of ObjectStore and secret resources across namespaces, and use unique serverName values per cluster if sharing a bucket. You can follow the discussion and status here: issue #448 and issue #524.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about plugin-barman-cloud Share Dosu with your team

dosubot[bot] avatar Jan 30 '26 12:01 dosubot[bot]