diff --git a/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go b/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go index fe8792c..f663f7d 100644 --- a/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go +++ b/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go @@ -185,6 +185,9 @@ func (e *Reconciler) ensurePodUserAndPasswordSecret(ctx context.Context, pod *v1 secret := buildUserAndPasswordCredentialsSecret(secretName, pod.Namespace, username, password) log.WithField("secret", secretName).Debug("Creating new secret with user-password credentials") if err := e.client.Create(ctx, secret); err != nil { + if apierrors.IsAlreadyExists(err) { + return ctrl.Result{Requeue: true}, false, "", nil + } return ctrl.Result{}, false, "", errors.Wrap(err) } return ctrl.Result{}, true, password, nil