Skip to content

Commit 2abbb31

Browse files
authored
fix: ensure pull secret is added to pooler ServiceAccount (#9427)
When creating a new pooler ServiceAccount, the imagePullSecret was not being added because the code incorrectly passed the nil resources.ServiceAccount instead of the newly created serviceAccount variable to the ensureServiceAccountHaveImagePullSecret function. This caused pooler deployments to fail pulling images from private registries, resulting in stuck rolling updates during operator upgrades. Fixes #9426 Signed-off-by: Marco Nenciarini <[email protected]>
1 parent b7c9690 commit 2abbb31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎internal/controller/pooler_update.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func (r *PoolerReconciler) updateServiceAccount(
235235

236236
if resources.ServiceAccount == nil {
237237
serviceAccount := pgbouncer.ServiceAccount(pooler)
238-
ensureServiceAccountHaveImagePullSecret(resources.ServiceAccount, pullSecretName)
238+
ensureServiceAccountHaveImagePullSecret(serviceAccount, pullSecretName)
239239
contextLog.Info("Creating service account")
240240
if err := ctrl.SetControllerReference(pooler, serviceAccount, r.Scheme); err != nil {
241241
return err

0 commit comments

Comments
 (0)