Skip to content

Commit

Permalink
Merge pull request #4155 from Yan-Daojiang/automated-cherry-pick-of-#…
Browse files Browse the repository at this point in the history
…4144-upstream-release-1.5

Automated cherry pick of #4144: fix: cannot access ResourceRegistry with its singularName
  • Loading branch information
karmada-bot authored Oct 20, 2023
2 parents 4079e4e + fab54b3 commit d69f90d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/registry/search/storage/resourceregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ func NewResourceRegistryStorage(scheme *runtime.Scheme, optsGetter generic.RESTO
strategy := searchregistry.NewStrategy(scheme)

store := &genericregistry.Store{
NewFunc: func() runtime.Object { return &searchapis.ResourceRegistry{} },
NewListFunc: func() runtime.Object { return &searchapis.ResourceRegistryList{} },
PredicateFunc: searchregistry.MatchResourceRegistry,
DefaultQualifiedResource: searchapis.Resource("resourceRegistries"),
NewFunc: func() runtime.Object { return &searchapis.ResourceRegistry{} },
NewListFunc: func() runtime.Object { return &searchapis.ResourceRegistryList{} },
PredicateFunc: searchregistry.MatchResourceRegistry,
// NOTE: plural name and singular name of the resource must be all lowercase.
DefaultQualifiedResource: searchapis.Resource("resourceregistries"),

CreateStrategy: strategy,
UpdateStrategy: strategy,
Expand Down

0 comments on commit d69f90d

Please sign in to comment.