[feature request] Allow specifying namespace of Barman ObjectStore CR
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
@dosu, is there any update
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.