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

backup method changed in the output of kubectl get backup

未关闭
#602 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
Go
星标
191
派生
72
平均合并
1 天 16 小时
30 天内合并 PR
18

描述

Hi, Team !

I have my CNPG 1.26.1 cluster with Barman Native configured.

```
tee $cluster_name.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: $cluster_name
namespace: $oname-system
spec:
instances: 3
imageName: $cnpg_image_name
storage:
size: 1Gi
backup:
retentionPolicy: "1d"
barmanObjectStore:
destinationPath: s3://cluster-backups/
endpointURL: http://minio-service:9000
s3Credentials:
accessKeyId:
name: minio-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: minio-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip
EOF
```

```
tee barman-backup.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: barman-backup
namespace: $oname-system
spec:
cluster:
name: $cluster_name
target: prefer-standby
EOF
```

I have two backups:
- `barman-backup` is done by `kubectl apply -f barman-backup.yaml`
- `cluster-barman-cnpg-20251016101137` is done by `kubectl cnpg -n $oname-system backup $cluster_name -m barmanObjectStore`

```
[alexey@wsl2 ~]$ kubectl get -n $oname-system backup
NAME AGE CLUSTER METHOD PHASE ERROR
barman-backup 57s cluster-barman-cnpg barmanObjectStore completed
cluster-barman-cnpg-20251016101137 6s cluster-barman-cnpg barmanObjectStore completed
```

Now I'm migrating to Barman Plugin 0.7.0:

```
tee $cluster_name.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: $cluster_name
namespace: $oname-system
spec:
instances: 3
imagePullPolicy: Always
imageName: $cnpg_image_name
storage:
size: 1Gi
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: minio-store
EOF
```

```
tee barman-backup.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: barman-backup
namespace: $oname-system
spec:
cluster:
name: $cluster_name
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
target: prefer-standby
EOF
```

After launching `kubectl apply -f barman-backup.yaml` I have the following:

```
[alexey@wsl2 ~]$ kubectl get -n $oname-system backup
NAME AGE CLUSTER METHOD PHASE ERROR
barman-backup 14m cluster-barman-cnpg plugin completed
cluster-barman-cnpg-20251016101137 13m cluster-barman-cnpg barmanObjectStore completed
```

So, somehow the `METHOD` for my older `barman-backup` backup has been changed from `barmanObjectStore` to `plugin`:

```
[alexey@wsl2 ~]$ kubectl get -n $oname-system backup
NAME AGE CLUSTER METHOD PHASE ERROR
barman-backup 57s cluster-barman-cnpg barmanObjectStore completed
cluster-barman-cnpg-20251016101137 6s cluster-barman-cnpg barmanObjectStore completed
```

Is it by design ? If not, can it be fixed ?

贡献指南

打开贡献指南

调研方向

报告重点关注通过 `kubectl get backup` 显示的 Backup 资源,以及 CNPG Barman plugin 迁移。首先复现从 `barmanObjectStore` 到 `plugin` 的迁移,并检查应用新的 Backup manifest 是否会更改现有对象的 METHOD;当原始 backup 的 method 仍然准确,或该行为被记录为有意行为时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
kubernetes, postgresql
领域
cloud, databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。