mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
climc: k8s-repo-sync
This commit is contained in:
@@ -58,4 +58,13 @@ func initRepo() {
|
||||
printObject(repo)
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&o.RepoGetOptions{}, cmdN("sync"), "Sync a repository", func(s *mcclient.ClientSession, args *o.RepoGetOptions) error {
|
||||
repo, err := k8s.Repos.PerformAction(s, args.NAME, "sync", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printObject(repo)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func (o AppBaseCreateOptions) Params() (*jsonutils.JSONDict, error) {
|
||||
|
||||
type AppCreateOptions struct {
|
||||
AppBaseCreateOptions
|
||||
ChartName string `help:"Meter helm chart name, e.g infra/meter" default:"infra/meter"`
|
||||
CHARTNAME string `help:"Helm release app chart name, e.g yunion/meter"`
|
||||
}
|
||||
|
||||
func (o AppCreateOptions) Params() (*jsonutils.JSONDict, error) {
|
||||
@@ -32,8 +32,6 @@ func (o AppCreateOptions) Params() (*jsonutils.JSONDict, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if o.ChartName != "" {
|
||||
params.Add(jsonutils.NewString(o.ChartName), "chart_name")
|
||||
}
|
||||
params.Add(jsonutils.NewString(o.CHARTNAME), "chart_name")
|
||||
return params, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user