You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(pooler): allow PgBouncer image management via image catalogs (cloudnative-pg#10568)
Users can now manage the PgBouncer image centrally by referencing an
entry in an `ImageCatalog` or `ClusterImageCatalog` through the new
`spec.pgbouncer.imageCatalogRef` field. Alternatively, a specific image
can still be pinned via `spec.pgbouncer.image`.
When a catalog entry is updated, all `Poolers` referencing it are
automatically reconciled and the `Deployment` rolls out the new image
without any change to the `Pooler` spec. The resolved image is reported
in `status.image`. A new `status.phase` (`active`, `paused`, `inactive`,
or `failed`) summarises the lifecycle, with `status.phaseReason`
carrying a human-readable cause when something is wrong.
`kubectl get pooler` also gains a `Phase` column for at-a-glance
visibility.
Upgrade note: after upgrading, each existing `Pooler`-managed
`Deployment` receives a one-time annotation patch
(`cnpg.io/poolerSpecHash`). The pod template is unchanged, so this patch
alone does not roll pgbouncer pods. If the upgrade also bumps the
default pgbouncer image, that bump (not the hash change) will trigger a
normal rolling restart.
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
// PgBouncerSpec defines how to configure PgBouncer
229
+
// +kubebuilder:validation:XValidation:rule="!(has(self.image) && has(self.imageCatalogRef))",message="image and imageCatalogRef are mutually exclusive"
192
230
typePgBouncerSpecstruct {
193
231
// The pool mode. Default: `session`.
194
232
// +kubebuilder:default:=session
@@ -250,16 +288,45 @@ type PgBouncerSpec struct {
250
288
// +kubebuilder:default:=false
251
289
// +optional
252
290
Paused*bool`json:"paused,omitempty"`
291
+
292
+
// Image is the pgbouncer container image to use. When set, it takes
293
+
// precedence over ImageCatalogRef and the operator default, but is
294
+
// overridden by an explicit image set in the pod template.
295
+
// +optional
296
+
Imagestring`json:"image,omitempty"`
297
+
298
+
// ImageCatalogRef points to an entry in an ImageCatalog or ClusterImageCatalog.
0 commit comments