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

@@ -45,6 +45,10 @@ const (
var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
func Resource(resource string) schema.GroupResource {
return GroupVersion.WithResource(resource).GroupResource()
}
func AddToContainer(c *restful.Container, factory informers.InformerFactory, k8sclient kubernetes.Interface, ksclient kubesphere.Interface, evtsClient events.Client, loggingClient logging.Interface, auditingclient auditing.Client) error {
mimePatch := []string{restful.MIME_JSON, runtime.MimeMergePatchJson, runtime.MimeJsonPatchJson}