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

Commit

Permalink
Merge pull request #2142 from tylerslaton/fix-manager-project-storage
Browse files Browse the repository at this point in the history
Fix issue with Project storage
  • Loading branch information
tylerslaton authored Sep 5, 2023
2 parents 7f4d66a + 60dda6f commit a8ddbcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/server/registry/apigroups/acorn/projects/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
v1 "github.com/acorn-io/runtime/pkg/apis/internal.acorn.io/v1"
"github.com/acorn-io/runtime/pkg/labels"
"github.com/acorn-io/runtime/pkg/tables"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -98,7 +99,10 @@ func migrateLegacyNamespaces(ctx context.Context, c kclient.Client) error {
}).Add(*notManaged)
namespaces := corev1.NamespaceList{}
if err := c.List(ctx, &namespaces, kclient.MatchingLabelsSelector{Selector: nsSelector}); err != nil {
return err
// If the namespace list call fails, then we just ignore it and move on. This is necessary to
// ensure that the migration doesn't block Manager start-up where namespaces don't exist.
logrus.WithError(err).Debug("namespace list call failed during migration of legacy namespaces, ignoring and moving on")
return nil
}

for _, ns := range namespaces.Items {
Expand Down

0 comments on commit a8ddbcc

Please sign in to comment.