mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
feat(climc): k8s cluster force deploy (#15372)
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user