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

invalid spec initContainers startupProbe Forbidden with barman cloud plugin

Aperta
#449 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
191
Fork
72
Merge medio
2g 21h
PR unite (30g)
21

Descrizione

Cluster pod does not start if I add barman cloud plugin with objectstore for WAL and backup purposes, I see invalid spec initContainers startupProbe Forbidden logs in operator logs attached below

cloudnative pg operator Version
1.26 (latest patch)

What version of Kubernetes are you using?
1.30

What is your Kubernetes environment?
Cloud: Azure AKS

How did you install the operator?
Helm

**objectstore yaml**
```
apiVersion: v1
kind: Secret
metadata:
name: testcnpg-azobjectstore-secret
type: Opaque
stringData:
AZURE_CONNECTION_STRING: "DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxxx;EndpointSuffix=core.windows.net"
---
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: testcnpg-azobjectstore
spec:
configuration:
destinationPath: "https://xxx.blob.core.windows.net/cnpg-backups/testcnpg"
azureCredentials:
connectionString:
name: testcnpg-azobjectstore-secret
key: AZURE_CONNECTION_STRING
wal:
compression: gzip
retentionPolicy: 30d
```

**Cluster resource**
```
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: testcnpg
spec:
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:15.10
postgresql:
parameters:
shared_buffers: 256MB
log_statement: mod
log_connections: "off"
log_disconnections: "off"
bootstrap:
initdb:
database: testcnpg
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: testcnpg-azobjectstore
storage:
storageClass: managed-csi
size: 1Gi
```

**operator logs**
```
{"level":"info","ts":"2025-07-14T14:01:55.17739142Z","msg":"Creating new Pod to reattach a PVC","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"testcnpg","namespace":"infra"},"namespace":"infra","name":"testcnpg","reconcileID":"b55c5ff4-acc2-48c4-96c3-419ce6c1ed9d","pod":"testcnpg-1","pvc":"testcnpg-1"}

{"level":"error","ts":"2025-07-14T14:01:55.727993328Z","msg":"Reconciler error","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"testcnpg","namespace":"infra"},"namespace":"infra","name":"testcnpg","reconcileID":"b55c5ff4-acc2-48c4-96c3-419ce6c1ed9d","error":"unable to create Pod: Pod \"testcnpg-1\" is invalid: spec.initContainers[1].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.20.4/pkg/internal/controller/controller.go:347\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.20.4/pkg/internal/controller/controller.go:294\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.20.4/pkg/internal/controller/controller.go:255"}
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.