feat(climc): k8s cluster force deploy (#15372)

This commit is contained in:
Zexi Li
2022-11-16 10:12:54 +08:00
committed by GitHub
parent 0728ffd474
commit bec38d9a16
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ func initKubeCluster() {
cmd.Create(new(o.K8SClusterCreateOptions))
cmd.Perform("sync", new(o.ClusterSyncOptions))
cmd.Perform("syncstatus", new(o.IdentOptions))
cmd.Perform("deploy", new(o.IdentOptions))
cmd.Perform("deploy", new(o.ClusterDeployOptions))
cmd.Get("components-status", new(o.IdentOptions))
cmd.Get("api-resources", new(o.IdentOptions))
cmd.Get("cluster-users", new(o.IdentOptions))
+13
View File
@@ -284,6 +284,19 @@ func (o ClusterSyncOptions) Params() (jsonutils.JSONObject, error) {
return param, nil
}
type ClusterDeployOptions struct {
IdentOptions
Force bool `help:"force deploy"`
}
func (o ClusterDeployOptions) Params() (jsonutils.JSONObject, error) {
param := jsonutils.NewDict()
if o.Force {
param.Add(jsonutils.JSONTrue, "force")
}
return param, nil
}
type ClusterK8sVersions struct {
PROVIDER string `help:"cluster provider" choices:"system|onecloud"`
}