Skip to content

Commit

Permalink
PTEUDO-2177: migration to exist source should not error
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabricio committed Dec 17, 2024
1 parent 0d7c125 commit 315b1ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/databaseclaim/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func (r *DatabaseClaimReconciler) createOrUpdateSecret(ctx context.Context, dbCl
Name: secretName,
}, gs)

if dbClaim.Status.ActiveDB.ConnectionInfo == nil && err == nil {
return fmt.Errorf("secret %s already exists in namespace %s, but no active database connection info is available", secretName, dbClaim.Namespace)
if dbClaim.Status.ActiveDB.ConnectionInfo == nil && err == nil && dbClaim.Spec.UseExistingSource == nil && !*dbClaim.Spec.UseExistingSource {
return fmt.Errorf("secret %s already exists in namespace %s, but no active database connection info is available", secretName, dbClaim.Namespace)
}

if err != nil && errors.IsNotFound(err) {
Expand Down

0 comments on commit 315b1ae

Please sign in to comment.