Init errors with "Forbidden: may not be set for init containers without restartPolicy=Always" #7932
Replies: 2 comments 3 replies
-
|
This issue was brought up in #7288, but this is on an EKS cluster using k8s 1.32, while the closed issue was only marked as happening on k8s versions before 1.29. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for clarifying, @dosubot -- I'm a little confused, as I have not added any podPatch injections to add a startupProbe (or any podPatch annotations at all). I have applied the manifests as-is from Cloudnative PG and Barman Cloud as per the documentation (https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.26/releases/cnpg-1.26.0.yaml and https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.5.0/manifest.yaml). Does this mean that the current version of Cloudnative PG is currently unusable with Barman Cloud? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
On Cloudnative-pg 1.26, I'm getting an error spinning up a cluster with the message:
{"level":"error","ts":"2025-06-27T15:20:28.98993801Z","msg":"Reconciler error","controller":"cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"intdb-cluster","namespace":"int-db"},"namespace":"int-db","name":"intdb-cluster","reconcileID":"527b355d-07f5-4a65-ac5b-d975fe8b7a33","error":"unable to create Pod: Pod "intdb-cluster-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"}
This message does not appear when applying an identical manifest against a cluster using Cloudnative-pg 1.25.1. Am I wrong, or does this appear to be an error in a field defined by the CNPG controller?
Beta Was this translation helpful? Give feedback.
All reactions