cloudnative-pg / cloudnative-pg/plugin-barman-cloud
plugin-barman-cloud fails with Istio sidecar injection enabled
- Dominant language
- Go
- Stars
- 192
- Forks
- 75
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 18
Description
### **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.
Contributor guide
Research direction
Start with the listed reproduction steps using CloudNativePG 1.26.1, Kubernetes 1.29.14, Istio 1.18.2, and the plugin-barman-cloud plugin. Investigate the operator's Pod creation path and the reported initContainer startupProbe validation error. Done means the Cluster creates Pods successfully with Istio injection enabled, and WAL archiving or backup works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100