diff --git a/pkg/mcclient/modules/k8s/rbac.go b/pkg/mcclient/modules/k8s/rbac.go index c3439995e7..fac7f78272 100644 --- a/pkg/mcclient/modules/k8s/rbac.go +++ b/pkg/mcclient/modules/k8s/rbac.go @@ -36,6 +36,7 @@ func init() { modules.Register(RbacRoles) modules.Register(RbacRoleBindings) + modules.Register(ServiceAccounts) } func (m RbacRoleManager) GetType(obj jsonutils.JSONObject) interface{} { diff --git a/pkg/mcclient/options/k8s/charts.go b/pkg/mcclient/options/k8s/charts.go index 96f60a1fce..a9d3afd771 100644 --- a/pkg/mcclient/options/k8s/charts.go +++ b/pkg/mcclient/options/k8s/charts.go @@ -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") }