mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
climc: k8s v1.12 option support
This commit is contained in:
@@ -74,12 +74,18 @@ func init() {
|
||||
return nil
|
||||
})
|
||||
|
||||
R(&DiskDetailOptions{}, "disk-delete", "Delete a disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
|
||||
disk, e := modules.Disks.Delete(s, args.ID, nil)
|
||||
if e != nil {
|
||||
return e
|
||||
type DiskDeleteOptions struct {
|
||||
ID []string `help:"ID of disks to delete" metavar:"DISK"`
|
||||
OverridePendingDelete bool `help:"Delete disk directly instead of pending delete"`
|
||||
}
|
||||
|
||||
R(&DiskDeleteOptions{}, "disk-delete", "Delete a disk", func(s *mcclient.ClientSession, args *DiskDeleteOptions) error {
|
||||
params := jsonutils.NewDict()
|
||||
if args.OverridePendingDelete {
|
||||
params.Add(jsonutils.JSONTrue, "override_pending_delete")
|
||||
}
|
||||
printObject(disk)
|
||||
ret := modules.Disks.BatchDeleteWithParam(s, args.ID, params, nil)
|
||||
printBatchResults(ret, modules.Disks.GetColumns(s))
|
||||
return nil
|
||||
})
|
||||
|
||||
|
||||
@@ -24,10 +24,14 @@ func (o ClusterListOptions) Params() *jsonutils.JSONDict {
|
||||
return params
|
||||
}
|
||||
|
||||
type K8sSupportVersion struct {
|
||||
K8sVersion string `help:"Cluster kubernetes components version" choices:"v1.10.5|v1.11.3|v1.12.0"`
|
||||
}
|
||||
|
||||
type ClusterCreateOptions struct {
|
||||
K8sSupportVersion
|
||||
NAME string `help:"Name of cluster"`
|
||||
Mode string `help:"Cluster mode" choices:"internal"`
|
||||
K8sVersion string `help:"Cluster kubernetes components version" choices:"v1.8.10|v1.9.5|v1.10.0"`
|
||||
InfraImage string `help:"Cluster kubelet infra container image"`
|
||||
Cidr string `help:"Cluster service CIDR, e.g. 10.43.0.0/16"`
|
||||
Domain string `help:"Cluster pod domain, e.g. cluster.local"`
|
||||
@@ -70,8 +74,8 @@ func (o ClusterImportOptions) Params() (*jsonutils.JSONDict, error) {
|
||||
}
|
||||
|
||||
type ClusterUpdateOptions struct {
|
||||
NAME string `help:"Name of cluster"`
|
||||
K8sVersion string `help:"Cluster kubernetes components version" choices:"v1.8.10|v1.9.5|v1.10.0"`
|
||||
NAME string `help:"Name of cluster"`
|
||||
K8sSupportVersion
|
||||
}
|
||||
|
||||
func (o ClusterUpdateOptions) Params() *jsonutils.JSONDict {
|
||||
|
||||
@@ -16,7 +16,7 @@ type TillerCreateOptions struct {
|
||||
Canary bool `json:"canary_image"`
|
||||
|
||||
// Override Tiller image
|
||||
Image string `json:"tiller_image" default:"yunion/tiller:v2.9.0"`
|
||||
Image string `json:"tiller_image" default:"yunion/tiller:v2.9.1"`
|
||||
// Limit the maximum number of revisions saved per release. Use 0 for no limit.
|
||||
MaxHistory int `json:"history_max"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user