feat: integrate API GPU kinds to group config.kubesphere.io

Signed-off-by: zhu733756 <talonzhu@yunify.com>
This commit is contained in:
zhu733756
2021-09-13 16:16:32 +08:00
parent fa4c899667
commit 48f63c3da0
4 changed files with 47 additions and 0 deletions

View File

@@ -45,6 +45,12 @@ func AddToContainer(c *restful.Container, config *kubesphereconfig.Config) error
response.WriteAsJson(config.ToMap())
}))
webservice.Route(webservice.GET("/configs/gpu/kinds").
Doc("Get all supported GPU kinds.").
To(func(request *restful.Request, response *restful.Response) {
response.WriteAsJson(config.GPUOptions.Kinds)
}))
c.Add(webservice)
return nil
}