mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #5415 from zexi/automated-cherry-pick-of-#5414-upstream-release-3.1
Automated cherry pick of #5414: opslog: notes use text column
This commit is contained in:
@@ -276,7 +276,7 @@ type SOpsLog struct {
|
||||
ObjId string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"` // = Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)
|
||||
ObjName string `width:"128" charset:"utf8" nullable:"false" list:"user" create:"required"` //= Column(VARCHAR(128, charset='utf8'), nullable=False)
|
||||
Action string `width:"32" charset:"utf8" nullable:"false" list:"user" create:"required"` //= Column(VARCHAR(32, charset='ascii'), nullable=False)
|
||||
Notes string `width:"2048" charset:"utf8" list:"user" create:"required"` // = Column(VARCHAR(2048, charset='utf8'))
|
||||
Notes string `charset:"utf8" list:"user" create:"required"`
|
||||
|
||||
ProjectId string `name:"tenant_id" width:"128" charset:"ascii" list:"user" create:"required" index:"true"` // = Column(VARCHAR(ID_LENGTH, charset='ascii'))
|
||||
Project string `name:"tenant" width:"128" charset:"utf8" list:"user" create:"required"` // tenant = Column(VARCHAR(128, charset='utf8'))
|
||||
|
||||
@@ -47,16 +47,18 @@ type AddMachineOptions struct {
|
||||
}
|
||||
|
||||
type KubeClusterCreateOptions struct {
|
||||
NAME string `help:"Name of cluster"`
|
||||
ClusterType string `help:"Cluster cluster type" choices:"default|serverless"`
|
||||
ResourceType string `help:"Cluster cluster type" choices:"host|guest"`
|
||||
CloudType string `help:"Cluster cloud type" choices:"private|public|hybrid"`
|
||||
Mode string `help:"Cluster mode type" choices:"customize|managed|import"`
|
||||
Provider string `help:"Cluster provider" choices:"onecloud|aws|aliyun|azure|qcloud|system"`
|
||||
ServiceCidr string `help:"Cluster service CIDR, e.g. 10.43.0.0/16"`
|
||||
ServiceDomain string `help:"Cluster service domain, e.g. cluster.local"`
|
||||
Vip string `help:"Cluster api server static loadbalancer vip"`
|
||||
Version string `help:"Cluster kubernetes version"`
|
||||
NAME string `help:"Name of cluster"`
|
||||
ClusterType string `help:"Cluster cluster type" choices:"default|serverless"`
|
||||
ResourceType string `help:"Cluster cluster type" choices:"host|guest"`
|
||||
CloudType string `help:"Cluster cloud type" choices:"private|public|hybrid"`
|
||||
Mode string `help:"Cluster mode type" choices:"customize|managed|import"`
|
||||
Provider string `help:"Cluster provider" choices:"onecloud|aws|aliyun|azure|qcloud|system"`
|
||||
ServiceCidr string `help:"Cluster service CIDR, e.g. 10.43.0.0/16"`
|
||||
ServiceDomain string `help:"Cluster service domain, e.g. cluster.local"`
|
||||
Vip string `help:"Cluster api server static loadbalancer vip"`
|
||||
Version string `help:"Cluster kubernetes version"`
|
||||
ImageRepo string `help:"Image repository, e.g. registry-1.docker.io/yunion"`
|
||||
ImageRepoInsecure bool `help:"Image repostiory is insecure"`
|
||||
|
||||
AddMachineOptions
|
||||
}
|
||||
@@ -136,11 +138,19 @@ func (o KubeClusterCreateOptions) Params() (*jsonutils.JSONDict, error) {
|
||||
if o.Vip != "" {
|
||||
params.Add(jsonutils.NewString(o.Vip), "vip")
|
||||
}
|
||||
imageRepo := jsonutils.NewDict()
|
||||
if o.ImageRepo != "" {
|
||||
imageRepo.Add(jsonutils.NewString(o.ImageRepo), "url")
|
||||
}
|
||||
if o.ImageRepoInsecure {
|
||||
imageRepo.Add(jsonutils.JSONTrue, "insecure")
|
||||
}
|
||||
machineObjs, err := o.AddMachineOptions.Params()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
params.Add(machineObjs, "machines")
|
||||
params.Add(imageRepo, "image_repository")
|
||||
return params, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user