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

plugin-barman-cloud fails with Istio sidecar injection enabled

Offen
#517 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Go
Sterne
191
Forks
72
Ø Merge
2 T. 21 Std.
Gemergte PRs (30 T.)
21

Beschreibung

### **Description**
When using CloudNativePG with the plugin-barman-cloud.cloudnative-pg.io plugin in a namespace where Istio sidecar injection is enabled, the operator fails to create Pods.

### **Environment**
CNPG version: 1.26.1
Kubernetes version: v1.29.14
Istio version: 1.18.2

### **Steps to reproduce**
1. Create a namespace with Istio injection enabled
2. Deploy CNPG Cluster with plugin-barman-cloud enabled
3. Observe the operator logs and Pod creation

### **Actual result**
Pods cannot be created. Operator logs show:
```
{"level":"info","ts":"2025-09-11T11:10:20.313679675Z","msg":"Creating new Pod to reattach a PVC","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"pg-cluster-test2","namespace":"test2"},"namespace":"test2","name":"pg-cluster-test2","reconcileID":"6bb22819-9916-4040-b8b6-e5e408e0db7a","pod":"pg-cluster-test2-1","pvc":"pg-cluster-test2-1"}
{"level":"error","ts":"2025-09-11T11:10:20.381608713Z","msg":"Reconciler error","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"pg-cluster-test2","namespace":"test2"},"namespace":"test2","name":"pg-cluster-test2","reconcileID":"6bb22819-9916-4040-b8b6-e5e408e0db7a","error":"unable to create Pod: Pod \"pg-cluster-test2-1\" is invalid: spec.initContainers[2].startupProbe: Forbidden: may not be set for init containers without restartPolicy=Always","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:353\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:300\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.1\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:202"}
```

### **Expected result**
Pods should be created successfully,
WAL archiver / backup plugin should work correctly,
Istio injection should either be compatible or possible to disable only for backup/archiver Pods.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit den aufgeführten Reproduktionsschritten unter Verwendung von CloudNativePG 1.26.1, Kubernetes 1.29.14, Istio 1.18.2 und dem plugin-barman-cloud-Plugin. Untersuche den Pod-Erstellungspfad des Operators und den gemeldeten initContainer startupProbe-Validierungsfehler beim Start. Als abgeschlossen gilt die Aufgabe, wenn der Cluster Pods erfolgreich erstellt, während die Istio-Injection aktiviert ist, und die WAL-Archivierung oder das Backup wie erwartet funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
go, kubernetes, postgresql
Bereich
databases, infrastructure
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.