Skip to content

Commit

Permalink
updated error condition for local-cluster ns
Browse files Browse the repository at this point in the history
Signed-off-by: dislbenn <dbennett@redhat.com>
  • Loading branch information
dislbenn committed Oct 7, 2024
1 parent 735ef20 commit 789c2ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion controllers/backplaneconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ func (r *MultiClusterEngineReconciler) finalizeBackplaneConfig(ctx context.Conte
}

localClusterNS := &corev1.Namespace{}
if err := r.Client.Get(ctx, types.NamespacedName{Name: "local-cluster"}, localClusterNS); err != nil {
if err := r.Client.Get(ctx, types.NamespacedName{Name: "local-cluster"}, localClusterNS); err == nil {
// If wait time exceeds expected then uninstall may not be able to progress
if time.Since(backplaneConfig.DeletionTimestamp.Time) < 10*time.Minute {
terminatingCondition := status.NewCondition(
Expand Down
5 changes: 0 additions & 5 deletions controllers/backplaneconfig_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ var _ = Describe("BackplaneConfig controller", func() {
Namespace: DestinationNamespace,
},
})).To(Succeed())
Expect(k8sClient.Delete(context.Background(), &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: "local-cluster",
},
})).To(Succeed())
})

BeforeEach(func() {
Expand Down

0 comments on commit 789c2ba

Please sign in to comment.