cloudnative-pg / cloudnative-pg/plugin-barman-cloud
backup method changed in the output of kubectl get backup
- 主要言語
- Go
- スター
- 191
- フォーク
- 72
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 21
説明
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 マニフェストを適用すると既存オブジェクトの METHOD が変更されるかを調査します。元の backup の method が正確なままになるか、またはその動作が意図的なものとして文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- kubernetes, postgresql
- 領域
- cloud, databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100