Skip to content

Commit

Permalink
Merge pull request #4144 from zhzhuang-zju/registryfix
Browse files Browse the repository at this point in the history
fix: cannot access ResourceRegistry with its singularName
  • Loading branch information
karmada-bot committed Oct 20, 2023
2 parents 7b7f4ce + 61302b5 commit a98d5fd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/registry/search/storage/resourceregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ 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"),
SingularQualifiedResource: searchapis.Resource("resourceRegistry"),
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"),
SingularQualifiedResource: searchapis.Resource("resourceregistry"),

CreateStrategy: strategy,
UpdateStrategy: strategy,
Expand Down

0 comments on commit a98d5fd

Please sign in to comment.