cloudnative-pg / cloudnative-pg/plugin-barman-cloud

Support Cluster Scoped ObjectStore in CNPG clusters

Open
#448 12 comments 18 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
191
Forks
72
Avg merge
2d 21h
Merged PRs (30d)
21

Description

Currently, when configuring the Barman Cloud plugin in a Cluster resource, the barmanObjectName parameter only allows referencing ObjectStore configurations from the same namespace as the CNPG Cluster.

I would like to request support for cross-namespace references so that we can define shared ObjectStore configurations centrally (e.g., in a cnpg-system or infrastructure namespace), and reuse them across multiple database clusters in different namespaces.

Current Behavior:

```yaml
spec:
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: minio-store # must exist in same namespace
```

This configuration requires a duplicate copy of minio-store in each namespace that has a Cluster.

Requested Behavior:
Allow for something like the following:

```yaml
spec:
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: minio-store
barmanObjectNamespace: cnpg-system # new field to support cross-namespace
```

Use Case / Motivation:

Centralize storage credentials and reduce secret duplication across environments.

Aligns with GitOps, multi-tenant, and RBAC best practices.

Improves DRY (Don't Repeat Yourself) and credential management in production-grade Kubernetes platforms.

Additional Context:
Similar cross-namespace reference patterns are used in projects like External Secrets Operator, cert-manager, and ArgoCD. This change would help platform teams standardize and secure backup configuration for PostgreSQL clusters across many namespaces.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by searching the repository for barmanObjectName and the namespace lookup or validation for ObjectStore references, then trace how Cluster plugin parameters are resolved. Done means a Cluster can reference an ObjectStore in another namespace through the proposed namespace field, with appropriate validation and tests for the cross-namespace behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.