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

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

Aperta
#553 1 commento 4 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Go
Stelle
191
Fork
72
Merge medio
2g 21h
PR unite (30g)
21

Descrizione

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
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing how configuration.destinationPath and configuration.endpointURL are processed alongside instanceSidecarConfiguration.env and Kubernetes ConfigMap values. Verify the behavior with the ObjectStore example: BUCKET_NAME and BUCKET_HOST should be expanded in both fields before the sidecar invokes Barman Cloud.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
go, kubernetes
Ambito
backend, cloud
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.