Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
Fix localdb secret name issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jianrongzhang89 committed Jan 12, 2024
1 parent 89f5392 commit 157a016
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/backstage_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ var _ = Describe("Backstage controller", func() {

By("Checking the localdb secret has been gnerated")
Eventually(func(g Gomega) {
err := k8sClient.Get(ctx, types.NamespacedName{Name: fmt.Sprintf("backstage-psql-secret-%s", backstageName), Namespace: ns}, &corev1.Secret{})
err := k8sClient.Get(ctx, types.NamespacedName{Name: getDefaultPsqlSecretName(backstage), Namespace: ns}, &corev1.Secret{})
g.Expect(err).To(Not(HaveOccurred()))
}, time.Minute, time.Second).Should(Succeed())

Expand Down
2 changes: 1 addition & 1 deletion controllers/local_db_statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (r *BackstageReconciler) cleanupLocalDbResources(ctx context.Context, backs

secret := &v1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: getDefaultDbObjName(backstage),
Name: getDefaultPsqlSecretName(&backstage),
Namespace: backstage.Namespace,
},
}
Expand Down

0 comments on commit 157a016

Please sign in to comment.