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

[Feature] Support env expansion in `configuration.{destinationPath,endpointURL}`

Ouverte
#553 1 commentaire 4 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Go
Étoiles
191
Forks
72
Merge moyen
1 j 16 h
PR mergées (30 j)
18

Description

When pointing to a Bucket created by another system (like Ceph), the name/endpoint of the bucket is often stored in a `ConfigMap` rather than being known ahead of time. I'm able to use `instanceSidecarConfiguration.env` to pass the values through to the side car, but it doesn't seem to support expanding these values.

```
{"level":"info","ts":"2025-09-27T15:54:46.914931355Z","logger":"barman-cloud-wal-restore","msg":"2025-09-27 15:54:46,914 [51] ERROR: Barman cloud WAL restore exception: Invalid endpoint: https://$BUCKET_HOST","pipe":"stderr","logging_pod":"pg-foobar"}
```

```yaml
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: db-backup
spec:
instanceSidecarConfiguration:
env:
- name: BUCKET_NAME
valueFrom:
configMapKeyRef:
name: db-backup-data-bucket
key: BUCKET_NAME
- name: BUCKET_HOST
valueFrom:
configMapKeyRef:
name: db-backup-data-bucket
key: BUCKET_HOST
retentionPolicy: "7d"
configuration:
destinationPath: s3://$BUCKET_NAME/
endpointURL: https://$BUCKET_HOST
s3Credentials:
accessKeyId:
name: db-backup-data-bucket
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: db-backup-data-bucket
key: AWS_SECRET_ACCESS_KEY
wal:
compression: gzip
data:
compression: gzip
```

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par suivre la manière dont configuration.destinationPath et configuration.endpointURL sont traités avec instanceSidecarConfiguration.env et les valeurs de Kubernetes ConfigMap. Vérifiez le comportement avec l’exemple ObjectStore : BUCKET_NAME et BUCKET_HOST doivent être développés dans les deux champs avant que le sidecar n’invoque Barman Cloud.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
go, kubernetes
Domaine
backend, cloud
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.