fix: resource scope (#2280)

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-07-07 15:24:10 +08:00
committed by GitHub
parent d50e59bc9e
commit 99aff3c7da
5 changed files with 41 additions and 5 deletions

View File

@@ -40,6 +40,10 @@ const (
var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}
func Resource(resource string) schema.GroupResource {
return GroupVersion.WithResource(resource).GroupResource()
}
func AddToContainer(c *restful.Container, informerFactory informers.InformerFactory) error {
webservice := runtime.NewWebService(GroupVersion)