climc: fix k8s sa not register

This commit is contained in:
Zexi Li
2019-11-13 16:45:20 +08:00
parent cf4bb0e642
commit 5e52e59724
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -36,6 +36,7 @@ func init() {
modules.Register(RbacRoles)
modules.Register(RbacRoleBindings)
modules.Register(ServiceAccounts)
}
func (m RbacRoleManager) GetType(obj jsonutils.JSONObject) interface{} {
+6 -2
View File
@@ -22,8 +22,9 @@ type ChartListOptions struct {
BaseListOptions
Repo string `help:"Repository name"`
RepoUrl string `help:"Repository url"`
AllVersion bool `json:"Get Chart all history versions"`
Keyword string `json:"Chart keyword"`
AllVersion bool `help:"Get Chart all history versions"`
Keyword string `help:"Chart keyword"`
Version string `help:"Chart semver version filter"`
}
func (o ChartListOptions) Params() *jsonutils.JSONDict {
@@ -40,6 +41,9 @@ func (o ChartListOptions) Params() *jsonutils.JSONDict {
if o.AllVersion {
params.Add(jsonutils.JSONTrue, "all_version")
}
if len(o.Version) != 0 {
params.Add(jsonutils.NewString(o.Version), "version")
}
if len(o.Keyword) != 0 {
params.Add(jsonutils.NewString(o.Keyword), "keyword")
}