Documentation ¶
Index ¶
- Constants
- func CheckKubeConfigType(kubeConfigType string) error
- type Autoscaler
- type BLB
- type CheckClusterIPCIDRArgs
- type CheckClusterIPCIDRResponse
- type CheckContainerNetworkCIDRArgs
- type CheckContainerNetworkCIDRResponse
- type CleanPolicy
- type Client
- func (c *Client) CheckClusterIPCIDR(args *CheckClusterIPCIDRArgs) (*CheckClusterIPCIDRResponse, error)
- func (c *Client) CheckContainerNetworkCIDR(args *CheckContainerNetworkCIDRArgs) (*CheckContainerNetworkCIDRResponse, error)
- func (c *Client) CreateAutoscaler(args *CreateAutoscalerArgs) (*CreateAutoscalerResponse, error)
- func (c *Client) CreateCluster(args *CreateClusterArgs) (*CreateClusterResponse, error)
- func (c *Client) CreateInstanceGroup(args *CreateInstanceGroupArgs) (*CreateInstanceGroupResponse, error)
- func (c *Client) CreateInstances(args *CreateInstancesArgs) (*CreateInstancesResponse, error)
- func (c *Client) CreateScaleDownInstanceGroupTask(args *CreateScaleDownInstanceGroupTaskArgs) (*CreateTaskResp, error)
- func (c *Client) CreateScaleUpInstanceGroupTask(args *CreateScaleUpInstanceGroupTaskArgs) (*CreateTaskResp, error)
- func (c *Client) DeleteCluster(args *DeleteClusterArgs) (*DeleteClusterResponse, error)
- func (c *Client) DeleteInstanceGroup(args *DeleteInstanceGroupArgs) (*DeleteInstanceGroupResponse, error)
- func (c *Client) DeleteInstances(args *DeleteInstancesArgs) (*DeleteInstancesResponse, error)
- func (c *Client) GetAutoscaler(args *GetAutoscalerArgs) (*GetAutoscalerResponse, error)
- func (c *Client) GetCluster(clusterID string) (*GetClusterResponse, error)
- func (c *Client) GetClusterCRD(args *GetClusterCRDArgs) (*GetClusterCRDResponse, error)
- func (c *Client) GetClusterEventSteps(clusterID string) (*GetEventStepsResponse, error)
- func (c *Client) GetClusterNodeQuota(clusterID string) (*GetQuotaResponse, error)
- func (c *Client) GetClusterQuota() (*GetQuotaResponse, error)
- func (c *Client) GetInstance(args *GetInstanceArgs) (*GetInstanceResponse, error)
- func (c *Client) GetInstanceCRD(args *GetInstanceCRDArgs) (*GetInstanceCRDResponse, error)
- func (c *Client) GetInstanceEventSteps(instanceID string) (*GetEventStepsResponse, error)
- func (c *Client) GetInstanceGroup(args *GetInstanceGroupArgs) (*GetInstanceGroupResponse, error)
- func (c *Client) GetKubeConfig(args *GetKubeConfigArgs) (*GetKubeConfigResponse, error)
- func (c *Client) GetTask(args *GetTaskArgs) (*GetTaskResp, error)
- func (c *Client) InstallAddon(args *InstallAddonArgs) (*CommonAddonResponse, error)
- func (c *Client) ListAddons(args *ListAddonArgs) (*GetAddonStatusResponse, error)
- func (c *Client) ListClusters(args *ListClustersArgs) (*ListClustersResponse, error)
- func (c *Client) ListInstanceGroups(args *ListInstanceGroupsArgs) (*ListInstanceGroupResponse, error)
- func (c *Client) ListInstancesByInstanceGroupID(args *ListInstanceByInstanceGroupIDArgs) (*ListInstancesByInstanceGroupIDResponse, error)
- func (c *Client) ListInstancesByPage(args *ListInstancesByPageArgs) (*ListInstancesResponse, error)
- func (c *Client) ListTasks(args *ListTasksArgs) (*ListTaskResp, error)
- func (c *Client) RecommendClusterIPCIDR(args *RecommendClusterIPCIDRArgs) (*RecommendClusterIPCIDRResponse, error)
- func (c *Client) RecommendContainerCIDR(args *RecommendContainerCIDRArgs) (*RecommendContainerCIDRResponse, error)
- func (c *Client) SyncInstances(clusterID string) (*SyncInstancesResponse, error)
- func (c *Client) UnInstallAddon(args *UninstallAddonArgs) (*CommonAddonResponse, error)
- func (c *Client) UpdateAddon(args *UpdateAddonArgs) (*CommonAddonResponse, error)
- func (c *Client) UpdateAutoscaler(args *UpdateAutoscalerArgs) (*UpdateAutoscalerResponse, error)
- func (c *Client) UpdateClusterCRD(args *UpdateClusterCRDArgs) (*CommonResponse, error)
- func (c *Client) UpdateInstance(args *UpdateInstanceArgs) (*UpdateInstancesResponse, error)
- func (c *Client) UpdateInstanceCRD(args *UpdateInstanceCRDRequest) (*CommonResponse, error)
- func (c *Client) UpdateInstanceGroupClusterAutoscalerSpec(args *UpdateInstanceGroupClusterAutoscalerSpecArgs) (*UpdateInstanceGroupClusterAutoscalerSpecResponse, error)
- func (c *Client) UpdateInstanceGroupReplicas(args *UpdateInstanceGroupReplicasArgs) (*UpdateInstanceGroupReplicasResponse, error)
- func (c *Client) UpgradeAddon(args *UpgradeAddonArgs) (*CommonAddonResponse, error)
- type Cluster
- type ClusterAutoscalerConfig
- type ClusterAutoscalerInstanceGroup
- type ClusterAutoscalerSpec
- type ClusterCRD
- type ClusterIPCIDRConflict
- type ClusterKeywordType
- type ClusterOrderBy
- type ClusterPage
- type ClusterSpec
- type ClusterStatus
- type CommonAddonResponse
- type CommonResponse
- type ConflictCluster
- type ConflictContainerCIDR
- type ConflictNodeCIDR
- type ConflictVPCRoute
- type ContainerCIDRConflict
- type CreateAutoscalerArgs
- type CreateAutoscalerResponse
- type CreateClusterArgs
- type CreateClusterOptions
- type CreateClusterRequest
- type CreateClusterResponse
- type CreateInstanceGroupArgs
- type CreateInstanceGroupRequest
- type CreateInstanceGroupResponse
- type CreateInstancesArgs
- type CreateInstancesResponse
- type CreateScaleDownInstanceGroupTaskArgs
- type CreateScaleUpInstanceGroupTaskArgs
- type CreateTaskResp
- type DeleteClusterArgs
- type DeleteClusterResponse
- type DeleteInstanceGroupArgs
- type DeleteInstanceGroupResponse
- type DeleteInstancesArgs
- type DeleteInstancesRequest
- type DeleteInstancesResponse
- type GetAddonStatusResponse
- type GetAutoscalerArgs
- type GetAutoscalerResponse
- type GetClusterCRDArgs
- type GetClusterCRDResponse
- type GetClusterResponse
- type GetEventStepsResponse
- type GetInstanceArgs
- type GetInstanceCRDArgs
- type GetInstanceCRDResponse
- type GetInstanceGroupArgs
- type GetInstanceGroupResponse
- type GetInstanceResponse
- type GetKubeConfigArgs
- type GetKubeConfigResponse
- type GetQuotaResponse
- type GetTaskArgs
- type GetTaskResp
- type InstallAddonArgs
- type Instance
- type InstanceCRD
- type InstanceGroup
- type InstanceGroupListOption
- type InstanceGroupSpec
- type InstanceGroupStatus
- type InstanceKeyType
- type InstanceKeywordType
- type InstanceOrderBy
- type InstancePage
- type InstanceSet
- type InstanceStatus
- type InstanceTemplate
- type Interface
- type KubeConfigType
- type ListAddonArgs
- type ListClustersArgs
- type ListClustersResponse
- type ListInstanceByInstanceGroupIDArgs
- type ListInstanceGroupPage
- type ListInstanceGroupResponse
- type ListInstanceGroupsArgs
- type ListInstancesByInstanceGroupIDPage
- type ListInstancesByInstanceGroupIDResponse
- type ListInstancesByPageArgs
- type ListInstancesByPageParams
- type ListInstancesResponse
- type ListTaskPage
- type ListTaskResp
- type ListTasksArgs
- type Machine
- type NetworkConflictInfo
- type NetworkConflictType
- type ObjectMeta
- type Order
- type PauseDetail
- type PrivateNetString
- type RecommendClusterIPCIDRArgs
- type RecommendClusterIPCIDRResponse
- type RecommendContainerCIDRArgs
- type RecommendContainerCIDRResponse
- type ReconcileResponse
- type ShrinkPolicy
- type Step
- type StepInfo
- type SyncInstancesResponse
- type UninstallAddonArgs
- type UpdateAddonArgs
- type UpdateAutoscalerArgs
- type UpdateAutoscalerResponse
- type UpdateClusterCRDArgs
- type UpdateClusterCRDResponses
- type UpdateClusterResponse
- type UpdateInstanceArgs
- type UpdateInstanceCRDRequest
- type UpdateInstanceGroupClusterAutoscalerSpecArgs
- type UpdateInstanceGroupClusterAutoscalerSpecResponse
- type UpdateInstanceGroupReplicasArgs
- type UpdateInstanceGroupReplicasRequest
- type UpdateInstanceGroupReplicasResponse
- type UpdateInstancesResponse
- type UpdatePolicy
- type UpgradeAddonArgs
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "api/cce/service/v2" DEFAULT_ENDPOINT = "cce." + bce.DEFAULT_REGION + ".baidubce.com" REQUEST_CLUSTER_URL = "/cluster" REQUEST_CLUSTER_LIST_URL = "/clusters" REQUEST_INSTANCE_URL = "/instance" REQUEST_INSTANCE_LIST_URL = "/instances" REQUEST_INSTANCEGROUP_URL = "/instancegroup" REQUEST_Addon_URL = "/addon" REQUEST_INSTANCEGROUP_LIST_URL = "/instancegroups" REQUEST_INSTANCEGROUP_AUTOSCALER_URL = "/autoscaler" REQUEST_INSTANCEGROUP_REPLICAS_URL = "/replicas" REQUEST_INSTANCEGROUP_SCALE_UP_URL = "/scaleup" REQUEST_INSTANCEGROUP_SCALE_DOWN_URL = "/scaledown" REQUEST_QUOTA_URL = "/quota" REQUEST_NODE_URL = "/node" REQUEST_NET_URL = "/net" REQUEST_NET_CHECK_CONTAINER_NETWORK_CIDR_URL = "/check_container_network_cidr" REQUEST_NET_CHECK_CLUSTERIP_CIDR_URL = "/check_clusterip_cidr" REQUEST_NET_RECOMMEND_CLSUTERIP_CIDR_URL = "/recommend_clusterip_cidr" REQUEST_NET_RECOMMEND_CONTAINER_CIDR_URL = "/recommend_container_cidr" REQUEST_AUTOSCALER = "/autoscaler" REQUEST_KUBECONFIG = "/kubeconfig/%s/%s" REQUEST_TASK_URL = "/task" REQUEST_TASK_LIST_URL = "/tasks" REQUEST_EVENT_URL = "/event" REQUEST_SYNC_URL = "/sync" )
const ( // PageNoDefault 分页查询默认页码 PageNoDefault int = 1 // PageSizeDefault 分页查询默认页面元素数目 PageSizeDefault int = 10 )
const (
// MaxClusterIPServiceNum 集群最大的 ClusterIP Service 数量
MaxClusterIPServiceNum = 65536
)
Variables ¶
This section is empty.
Functions ¶
func CheckKubeConfigType ¶ added in v0.9.25
Types ¶
type Autoscaler ¶ added in v0.9.20
type Autoscaler struct { ClusterID string `json:"clusterID"` ClusterName string `json:"clusterName"` CAConfig ClusterAutoscalerConfig `json:"caConfig,omitempty"` }
type CheckClusterIPCIDRArgs ¶
type CheckClusterIPCIDRArgs struct { VPCID string `json:"vpcID"` VPCCIDR string `json:"vpcCIDR"` VPCCIDRIPv6 string `json:"vpcCIDRIPv6"` ClusterIPCIDR string `json:"clusterIPCIDR"` ClusterIPCIDRIPv6 string `json:"clusterIPCIDRIPv6"` IPVersion types.ContainerNetworkIPType `json:"ipVersion"` // if not set, set ipv4 }
CheckClusterIPCIDRequest - 检查 ClusterIP CIDR 请求
type CheckClusterIPCIDRResponse ¶
type CheckClusterIPCIDRResponse struct { IsConflict bool `json:"isConflict"` ErrMsg string `json:"errMsg"` RequestID string `json:"requestID"` }
CheckClusterIPCIDRResponse - 检查 ClusterIP CIDR 返回
type CheckContainerNetworkCIDRArgs ¶
type CheckContainerNetworkCIDRArgs struct { VPCID string `json:"vpcID"` VPCCIDR string `json:"vpcCIDR"` VPCCIDRIPv6 string `json:"vpcCIDRIPv6"` ContainerCIDR string `json:"containerCIDR"` ContainerCIDRIPv6 string `json:"containerCIDRIPv6"` ClusterIPCIDR string `json:"clusterIPCIDR"` ClusterIPCIDRIPv6 string `json:"clusterIPCIDRIPv6"` MaxPodsPerNode int `json:"maxPodsPerNode"` IPVersion types.ContainerNetworkIPType `json:"ipVersion"` // if not set, set ipv4 }
CheckContainerNetworkCIDRRequest 包含检查容器网络网段冲突的请求参数
type CheckContainerNetworkCIDRResponse ¶
type CheckContainerNetworkCIDRResponse struct { MaxNodeNum int `json:"maxNodeNum"` NetworkConflictInfo RequestID string `json:"requestID"` }
CheckContainerNetworkCIDRResponse 检查容器网络网段冲突的响应
type CleanPolicy ¶ added in v0.9.20
type CleanPolicy string
type Client ¶
Client 实现 ccev2.Interface
func (*Client) CheckClusterIPCIDR ¶
func (c *Client) CheckClusterIPCIDR(args *CheckClusterIPCIDRArgs) (*CheckClusterIPCIDRResponse, error)
检查集群网络网段
func (*Client) CheckContainerNetworkCIDR ¶
func (c *Client) CheckContainerNetworkCIDR(args *CheckContainerNetworkCIDRArgs) (*CheckContainerNetworkCIDRResponse, error)
检查容器网络网段
func (*Client) CreateAutoscaler ¶ added in v0.9.25
func (c *Client) CreateAutoscaler(args *CreateAutoscalerArgs) (*CreateAutoscalerResponse, error)
创建autoscaler配置
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(args *CreateClusterArgs) (*CreateClusterResponse, error)
创建集群
func (*Client) CreateInstanceGroup ¶ added in v0.9.20
func (c *Client) CreateInstanceGroup(args *CreateInstanceGroupArgs) (*CreateInstanceGroupResponse, error)
创建节点组
func (*Client) CreateInstances ¶
func (c *Client) CreateInstances(args *CreateInstancesArgs) (*CreateInstancesResponse, error)
创建节点(扩容)
func (*Client) CreateScaleDownInstanceGroupTask ¶ added in v0.9.76
func (c *Client) CreateScaleDownInstanceGroupTask(args *CreateScaleDownInstanceGroupTaskArgs) (*CreateTaskResp, error)
创建节点组缩容任务
func (*Client) CreateScaleUpInstanceGroupTask ¶ added in v0.9.76
func (c *Client) CreateScaleUpInstanceGroupTask(args *CreateScaleUpInstanceGroupTaskArgs) (*CreateTaskResp, error)
创建节点组扩容任务
func (*Client) DeleteCluster ¶
func (c *Client) DeleteCluster(args *DeleteClusterArgs) (*DeleteClusterResponse, error)
DeleteCluster 删除集群
func (*Client) DeleteInstanceGroup ¶ added in v0.9.20
func (c *Client) DeleteInstanceGroup(args *DeleteInstanceGroupArgs) (*DeleteInstanceGroupResponse, error)
删除节点组
func (*Client) DeleteInstances ¶
func (c *Client) DeleteInstances(args *DeleteInstancesArgs) (*DeleteInstancesResponse, error)
删除节点(缩容)
func (*Client) GetAutoscaler ¶ added in v0.9.25
func (c *Client) GetAutoscaler(args *GetAutoscalerArgs) (*GetAutoscalerResponse, error)
GetAutoscaler 查询autoscaler配置
func (*Client) GetCluster ¶
func (c *Client) GetCluster(clusterID string) (*GetClusterResponse, error)
获得集群详情
func (*Client) GetClusterCRD ¶ added in v0.9.107
func (c *Client) GetClusterCRD(args *GetClusterCRDArgs) (*GetClusterCRDResponse, error)
func (*Client) GetClusterEventSteps ¶ added in v0.9.168
func (c *Client) GetClusterEventSteps(clusterID string) (*GetEventStepsResponse, error)
GetClusterEventSteps 获取集群事件详情
func (*Client) GetClusterNodeQuota ¶
func (c *Client) GetClusterNodeQuota(clusterID string) (*GetQuotaResponse, error)
用户集群 Node Quota
func (*Client) GetClusterQuota ¶
func (c *Client) GetClusterQuota() (*GetQuotaResponse, error)
用户集群 Quota
func (*Client) GetInstance ¶
func (c *Client) GetInstance(args *GetInstanceArgs) (*GetInstanceResponse, error)
查询节点
func (*Client) GetInstanceCRD ¶ added in v0.9.103
func (c *Client) GetInstanceCRD(args *GetInstanceCRDArgs) (*GetInstanceCRDResponse, error)
func (*Client) GetInstanceEventSteps ¶ added in v0.9.172
func (c *Client) GetInstanceEventSteps(instanceID string) (*GetEventStepsResponse, error)
GetClusterEventSteps 获取集群事件详情
func (*Client) GetInstanceGroup ¶ added in v0.9.20
func (c *Client) GetInstanceGroup(args *GetInstanceGroupArgs) (*GetInstanceGroupResponse, error)
获取节点组详情
func (*Client) GetKubeConfig ¶ added in v0.9.25
func (c *Client) GetKubeConfig(args *GetKubeConfigArgs) (*GetKubeConfigResponse, error)
获取kubeconfig
func (*Client) GetTask ¶ added in v0.9.76
func (c *Client) GetTask(args *GetTaskArgs) (*GetTaskResp, error)
获取任务信息
func (*Client) InstallAddon ¶ added in v0.9.172
func (c *Client) InstallAddon(args *InstallAddonArgs) (*CommonAddonResponse, error)
func (*Client) ListAddons ¶ added in v0.9.172
func (c *Client) ListAddons(args *ListAddonArgs) (*GetAddonStatusResponse, error)
func (*Client) ListClusters ¶
func (c *Client) ListClusters(args *ListClustersArgs) (*ListClustersResponse, error)
集群列表
func (*Client) ListInstanceGroups ¶ added in v0.9.20
func (c *Client) ListInstanceGroups(args *ListInstanceGroupsArgs) (*ListInstanceGroupResponse, error)
获取节点组列表
func (*Client) ListInstancesByInstanceGroupID ¶ added in v0.9.20
func (c *Client) ListInstancesByInstanceGroupID(args *ListInstanceByInstanceGroupIDArgs) (*ListInstancesByInstanceGroupIDResponse, error)
获取节点组的节点列表
func (*Client) ListInstancesByPage ¶
func (c *Client) ListInstancesByPage(args *ListInstancesByPageArgs) (*ListInstancesResponse, error)
集群内节点列表
func (*Client) ListTasks ¶ added in v0.9.76
func (c *Client) ListTasks(args *ListTasksArgs) (*ListTaskResp, error)
获取任务列表
func (*Client) RecommendClusterIPCIDR ¶
func (c *Client) RecommendClusterIPCIDR(args *RecommendClusterIPCIDRArgs) (*RecommendClusterIPCIDRResponse, error)
推荐集群CIDR
func (*Client) RecommendContainerCIDR ¶
func (c *Client) RecommendContainerCIDR(args *RecommendContainerCIDRArgs) (*RecommendContainerCIDRResponse, error)
推荐容器CIDR
func (*Client) SyncInstances ¶ added in v0.9.172
func (c *Client) SyncInstances(clusterID string) (*SyncInstancesResponse, error)
SyncInstances 同步节点元信息
func (*Client) UnInstallAddon ¶ added in v0.9.172
func (c *Client) UnInstallAddon(args *UninstallAddonArgs) (*CommonAddonResponse, error)
func (*Client) UpdateAddon ¶ added in v0.9.172
func (c *Client) UpdateAddon(args *UpdateAddonArgs) (*CommonAddonResponse, error)
func (*Client) UpdateAutoscaler ¶ added in v0.9.25
func (c *Client) UpdateAutoscaler(args *UpdateAutoscalerArgs) (*UpdateAutoscalerResponse, error)
更新autoscaler配置
func (*Client) UpdateClusterCRD ¶ added in v0.9.107
func (c *Client) UpdateClusterCRD(args *UpdateClusterCRDArgs) (*CommonResponse, error)
func (*Client) UpdateInstance ¶ added in v0.9.25
func (c *Client) UpdateInstance(args *UpdateInstanceArgs) (*UpdateInstancesResponse, error)
更新节点配置
func (*Client) UpdateInstanceCRD ¶ added in v0.9.103
func (c *Client) UpdateInstanceCRD(args *UpdateInstanceCRDRequest) (*CommonResponse, error)
func (*Client) UpdateInstanceGroupClusterAutoscalerSpec ¶ added in v0.9.25
func (c *Client) UpdateInstanceGroupClusterAutoscalerSpec(args *UpdateInstanceGroupClusterAutoscalerSpecArgs) (*UpdateInstanceGroupClusterAutoscalerSpecResponse, error)
修改节点组节点Autoscaler配置
func (*Client) UpdateInstanceGroupReplicas ¶ added in v0.9.20
func (c *Client) UpdateInstanceGroupReplicas(args *UpdateInstanceGroupReplicasArgs) (*UpdateInstanceGroupReplicasResponse, error)
更新节点组副本数
func (*Client) UpgradeAddon ¶ added in v0.9.172
func (c *Client) UpgradeAddon(args *UpgradeAddonArgs) (*CommonAddonResponse, error)
升级
type Cluster ¶
type Cluster struct { Spec *ClusterSpec `json:"spec"` Status *ClusterStatus `json:"status"` CreatedAt time.Time `json:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
Cluster - Cluster 返回
type ClusterAutoscalerConfig ¶ added in v0.9.20
type ClusterAutoscalerConfig struct { KubeVersion string `json:"kubeVersion,omitempty"` ReplicaCount int `json:"replicaCount"` InstanceGroups []ClusterAutoscalerInstanceGroup `json:"instanceGroups,omitempty"` // default: false ScaleDownEnabled bool `json:"scaleDownEnabled"` // 可选,缩容阈值百分比,范围(0, 100) ScaleDownUtilizationThreshold *int `json:"scaleDownUtilizationThreshold,omitempty"` // 可选,GPU缩容阈值百分比,范围(0, 100) ScaleDownGPUUtilizationThreshold *int `json:"scaleDownGPUUtilizationThreshold,omitempty"` // 可选,缩容触发时延,单位:m ScaleDownUnneededTime *int `json:"scaleDownUnneededTime,omitempty"` // 可选,扩容后缩容启动时延,单位:m ScaleDownDelayAfterAdd *int `json:"scaleDownDelayAfterAdd,omitempty"` // 可选,最大并发缩容数 MaxEmptyBulkDelete *int `json:"maxEmptyBulkDelete,omitempty"` // 可选, SkipNodesWithLocalStorage *bool `json:"skipNodesWithLocalStorage,omitempty"` // 可选, SkipNodesWithSystemPods *bool `json:"skipNodesWithSystemPods,omitempty"` // supported: random, most-pods, least-waste, priority; default: random Expander string `json:"expander"` // 可选,支持保留用户自定义配置 CustomConfigs map[string]string `json:"customConfigs,omitempty"` }
type ClusterAutoscalerInstanceGroup ¶ added in v0.9.20
type ClusterAutoscalerSpec ¶ added in v0.9.20
type ClusterCRD ¶ added in v0.9.107
type ClusterCRD struct { ObjectMeta `json:"metadata,omitempty"` Spec types.ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
type ClusterIPCIDRConflict ¶
type ClusterIPCIDRConflict struct { // NetworkConflictType 冲突类型,可取的值: ClusterIPCIDRAndNodeCIDRConflict、ClusterIPCIDRAndContainerCIDRConflict ConflictType NetworkConflictType `json:"conflictType"` // ConflictNodeCIDR 与 ClusterIP 网段冲突的节点网段,当且仅当 NetworkConflictType 为 ClusterIPCIDRAndNodeCIDRConflict 不为 nil ConflictNodeCIDR *ConflictNodeCIDR `json:"conflictNodeCIDR"` // ConflictContainerCIDR 与 ClusterIP 网段冲突的节点网段,当且仅当 NetworkConflictType 为 ClusterIPCIDRAndContainerCIDRConflict 不为 nil ConflictContainerCIDR *ConflictContainerCIDR `json:"conflictContainerCIDR"` }
ClusterIPCIDRConflict ClusterIP 网段冲突信息
type ClusterKeywordType ¶
type ClusterKeywordType string
ClusterKeywordType 集群模糊查询字段
const ( // ClusterKeywordTypeClusterName 集群模糊查询字段: ClusterName ClusterKeywordTypeClusterName ClusterKeywordType = "clusterName" // ClusterKeywordTypeClusterID 集群模糊查询字段: ClusterID ClusterKeywordTypeClusterID ClusterKeywordType = "clusterID" )
type ClusterOrderBy ¶
type ClusterOrderBy string
ClusterOrderBy 集群查询排序字段
const ( // ClusterOrderByClusterName 集群查询排序字段: ClusterName ClusterOrderByClusterName ClusterOrderBy = "clusterName" // ClusterOrderByClusterID 集群查询排序字段: ClusterID ClusterOrderByClusterID ClusterOrderBy = "clusterID" // ClusterOrderByCreatedAt 集群查询排序字段: CreatedAt ClusterOrderByCreatedAt ClusterOrderBy = "createdAt" )
type ClusterPage ¶
type ClusterPage struct { KeywordType ClusterKeywordType `json:"keywordType"` Keyword string `json:"keyword"` OrderBy ClusterOrderBy `json:"orderBy"` Order Order `json:"order"` PageNo int `json:"pageNo"` PageSize int `json:"pageSize"` TotalCount int `json:"totalCount"` ClusterList []*Cluster `json:"clusterList"` }
ClusterPage - 集群分页查询返回
type ClusterSpec ¶
type ClusterSpec struct { ClusterID string `json:"clusterID"` ClusterName string `json:"clusterName"` ClusterType types.ClusterType `json:"clusterType"` Description string `json:"description"` K8SVersion types.K8SVersion `json:"k8sVersion"` VPCID string `json:"vpcID"` VPCCIDR string `json:"vpcCIDR"` Plugins []string `json:"plugins"` MasterConfig types.MasterConfig `json:"masterConfig"` ContainerNetworkConfig types.ContainerNetworkConfig `json:"containerNetworkConfig"` Tags []types.Tag `json:"tags"` }
作为返回值的ClusterSpec
type ClusterStatus ¶
type ClusterStatus struct { ClusterBLB BLB `json:"clusterBLB"` ClusterPhase types.ClusterPhase `json:"clusterPhase"` NodeNum int `json:"nodeNum"` }
ClusterStatus - Cluster Status
type CommonAddonResponse ¶ added in v0.9.172
type CommonResponse ¶
type CommonResponse struct {
RequestID string `json:"requestID"`
}
type ConflictCluster ¶
type ConflictCluster struct { ClusterID string `json:"clusterID"` ContainerCIDR string `json:"containerCIDR"` }
ConflictCluster 同一 VPC 内容器网段冲突的集群信息
type ConflictContainerCIDR ¶
type ConflictContainerCIDR struct {
ContainerCIDR string `json:"containerCIDR"`
}
ConflictContainerCIDR 容器网段冲突信息
type ConflictNodeCIDR ¶
type ConflictNodeCIDR struct {
NodeCIDR string `json:"nodeCIDR"`
}
ConflictNodeCIDR 节点网段冲突信息
type ConflictVPCRoute ¶
ConflictVPCRoute 冲突的 VPC 路由
type ContainerCIDRConflict ¶
type ContainerCIDRConflict struct { // NetworkConflictType 冲突类型,可取的值: ContainerCIDRAndNodeCIDRConflict、ContainerCIDRAndExistedClusterContainerCIDRConflict、ContainerCIDRAndVPCRouteConflict ConflictType NetworkConflictType `json:"conflictType"` // ConflictNodeCIDR 与容器网段冲突的节点网段,当且仅当 NetworkConflictType 为 ContainerCIDRAndNodeCIDRConflict 不为 nil ConflictNodeCIDR *ConflictNodeCIDR `json:"conflictNodeCIDR"` // ConflictCluster 与容器网段冲突的VPC内集群,当且仅当 NetworkConflictType 为 ContainerCIDRAndExistedClusterContainerCIDRConflict 不为 nil ConflictCluster *ConflictCluster `json:"conflictCluster"` // ConflictVPCRoute 与容器网段冲突的VPC路由,当且仅当 NetworkConflictType 为 ContainerCIDRAndVPCRouteConflict 不为 nil ConflictVPCRoute *ConflictVPCRoute `json:"conflictVPCRoute"` }
ContainerCIDRConflict 容器网段冲突信息
type CreateAutoscalerArgs ¶ added in v0.9.25
type CreateAutoscalerArgs struct {
ClusterID string
}
type CreateAutoscalerResponse ¶ added in v0.9.25
type CreateAutoscalerResponse struct {
CommonResponse
}
type CreateClusterArgs ¶
type CreateClusterArgs struct {
CreateClusterRequest *CreateClusterRequest
}
CreateClusterArgs 为后续支持clientToken预留空间
type CreateClusterOptions ¶ added in v0.9.168
type CreateClusterOptions struct {
SkipNetworkCheck *bool `json:"skipNetworkCheck"`
}
type CreateClusterRequest ¶
type CreateClusterRequest struct { ClusterSpec *types.ClusterSpec `json:"cluster"` MasterSpecs []*InstanceSet `json:"masters,omitempty"` NodeSpecs []*InstanceSet `json:"nodes,omitempty"` Options CreateClusterOptions `json:"options"` }
CreateClusterRequest - 创建 Cluster 参数
type CreateClusterResponse ¶
type CreateClusterResponse struct { ClusterID string `json:"clusterID"` RequestID string `json:"requestID"` }
CreateClusterResponse - 创建 Cluster 返回
type CreateInstanceGroupArgs ¶ added in v0.9.20
type CreateInstanceGroupArgs struct { ClusterID string Request *CreateInstanceGroupRequest }
type CreateInstanceGroupRequest ¶ added in v0.9.20
type CreateInstanceGroupRequest struct {
types.InstanceGroupSpec
}
CreateInstanceGroupRequest - 创建InstanceGroup request
type CreateInstanceGroupResponse ¶ added in v0.9.20
type CreateInstanceGroupResponse struct { CommonResponse InstanceGroupID string `json:"instanceGroupID"` }
CreateInstanceGroupResponse - 创建InstanceGroup response
type CreateInstancesArgs ¶
type CreateInstancesArgs struct { ClusterID string Instances []*InstanceSet }
type CreateInstancesResponse ¶
type CreateInstancesResponse struct { CCEInstanceIDs []string `json:"cceInstanceIDs"` RequestID string `json:"requestID"` }
CreateInstancesResponse - 创建 Instances 返回
type CreateScaleDownInstanceGroupTaskArgs ¶ added in v0.9.76
type CreateScaleUpInstanceGroupTaskArgs ¶ added in v0.9.76
type CreateTaskResp ¶ added in v0.9.76
type CreateTaskResp struct { CommonResponse TaskID string `json:"taskID"` }
type DeleteClusterArgs ¶
type DeleteClusterResponse ¶
type DeleteClusterResponse struct {
RequestID string `json:"requestID"`
}
DeleteClusterResponse - 删除 Cluster 返回
type DeleteInstanceGroupArgs ¶ added in v0.9.20
type DeleteInstanceGroupResponse ¶ added in v0.9.20
type DeleteInstanceGroupResponse struct {
CommonResponse
}
type DeleteInstancesArgs ¶
type DeleteInstancesArgs struct { ClusterID string DeleteInstancesRequest *DeleteInstancesRequest }
type DeleteInstancesRequest ¶
type DeleteInstancesRequest struct { InstanceIDs []string `json:"instanceIDs,omitempty"` DeleteOption *types.DeleteOption `json:"deleteOption,omitempty"` }
DeleteInstancesRequest - 删除节点请求
type DeleteInstancesResponse ¶
type DeleteInstancesResponse struct {
RequestID string `json:"requestID"`
}
DeleteInstancesResponse - 删除 Instances 返回
type GetAddonStatusResponse ¶ added in v0.9.172
type GetAutoscalerArgs ¶ added in v0.9.25
type GetAutoscalerArgs struct {
ClusterID string
}
type GetAutoscalerResponse ¶ added in v0.9.20
type GetAutoscalerResponse struct { Autoscaler *Autoscaler `json:"autoscaler"` RequestID string `json:"requestID"` }
type GetClusterCRDArgs ¶ added in v0.9.107
type GetClusterCRDArgs struct {
ClusterID string `json:"clusterID"`
}
type GetClusterCRDResponse ¶ added in v0.9.107
type GetClusterCRDResponse struct { Cluster *ClusterCRD `json:"cluster"` RequestID string `json:"requestID"` }
type GetClusterResponse ¶
type GetClusterResponse struct { Cluster *Cluster `json:"cluster"` RequestID string `json:"requestID"` }
GetClusterResponse - 查询 Cluster 返回
type GetEventStepsResponse ¶ added in v0.9.168
type GetEventStepsResponse struct { Status string `json:"status"` Steps []*Step `json:"steps"` RequestID string `json:"requestID"` }
GetEventStepsResponse 查询 Cluster/Instance 创建/删除 返回
type GetInstanceArgs ¶
type GetInstanceCRDArgs ¶ added in v0.9.103
type GetInstanceCRDResponse ¶ added in v0.9.103
type GetInstanceCRDResponse struct { Instance *InstanceCRD `json:"instance"` RequestID string `json:"requestID"` }
type GetInstanceGroupArgs ¶ added in v0.9.20
type GetInstanceGroupResponse ¶ added in v0.9.20
type GetInstanceGroupResponse struct { CommonResponse InstanceGroup *InstanceGroup `json:"instanceGroup"` }
type GetInstanceResponse ¶
type GetInstanceResponse struct { Instance *Instance `json:"instance"` RequestID string `json:"requestID"` }
GetInstanceResponse - 查询 Instances 返回
type GetKubeConfigArgs ¶ added in v0.9.25
type GetKubeConfigArgs struct { ClusterID string KubeConfigType KubeConfigType }
type GetKubeConfigResponse ¶ added in v0.9.25
type GetKubeConfigResponse struct { KubeConfigType KubeConfigType `json:"kubeConfigType"` KubeConfig string `json:"kubeConfig"` RequestID string `json:"requestID"` }
GetKubeConfigResponse - 查询 KubeConfig 返回
type GetQuotaResponse ¶
GetQuotaResponse - 查询 Quota 返回
type GetTaskArgs ¶ added in v0.9.76
type GetTaskResp ¶ added in v0.9.76
type GetTaskResp struct { CommonResponse Task *types.Task `json:"task"` }
type InstallAddonArgs ¶ added in v0.9.172
type Instance ¶
type Instance struct { Spec *types.InstanceSpec `json:"spec"` Status *InstanceStatus `json:"status"` CreatedAt time.Time `json:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
Instance - 节点详情 作为sdk返回结果的Instance
type InstanceCRD ¶ added in v0.9.103
type InstanceCRD struct { ObjectMeta `json:"metadata,omitempty"` Spec types.InstanceSpec `json:"spec,omitempty"` Status InstanceStatus `json:"status,omitempty"` }
type InstanceGroup ¶ added in v0.9.20
type InstanceGroup struct { Spec *InstanceGroupSpec `json:"spec"` Status *InstanceGroupStatus `json:"status"` CreatedAt time.Time `json:"createdAt"` }
type InstanceGroupListOption ¶ added in v0.9.20
type InstanceGroupSpec ¶ added in v0.9.20
type InstanceGroupSpec struct { CCEInstanceGroupID string `json:"cceInstanceGroupID,omitempty"` InstanceGroupName string `json:"instanceGroupName"` ClusterID string `json:"clusterID,omitempty"` ClusterRole types.ClusterRole `json:"clusterRole,omitempty"` ShrinkPolicy ShrinkPolicy `json:"shrinkPolicy,omitempty"` UpdatePolicy UpdatePolicy `json:"updatePolicy,omitempty"` CleanPolicy CleanPolicy `json:"cleanPolicy,omitempty"` InstanceTemplate InstanceTemplate `json:"instanceTemplate"` Replicas int `json:"replicas"` ClusterAutoscalerSpec *ClusterAutoscalerSpec `json:"clusterAutoscalerSpec,omitempty"` }
type InstanceGroupStatus ¶ added in v0.9.20
type InstanceGroupStatus struct { ReadyReplicas int `json:"readyReplicas"` Pause *PauseDetail `json:"pause,omitempty"` }
InstanceGroupStatus -
type InstanceKeywordType ¶
type InstanceKeywordType string
InstanceKeywordType 节点模糊查询字段
const ( // InstanceKeywordTypeInstanceName 节点模糊查询字段: InstanceName InstanceKeywordTypeInstanceName InstanceKeywordType = "instanceName" // InstanceKeywordTypeInstanceID 节点模糊查询字段: InstanceID InstanceKeywordTypeInstanceID InstanceKeywordType = "instanceID" )
type InstanceOrderBy ¶
type InstanceOrderBy string
InstanceOrderBy 节点查询排序字段
const ( // InstanceOrderByInstanceName 节点查询排序字段: InstanceName InstanceOrderByInstanceName InstanceOrderBy = "instanceName" // InstanceOrderByInstanceID 节点查询排序字段: InstanceID InstanceOrderByInstanceID InstanceOrderBy = "instanceID" // InstanceOrderByCreatedAt 节点查询排序字段: CreatedAt InstanceOrderByCreatedAt InstanceOrderBy = "createdAt" )
type InstancePage ¶
type InstancePage struct { ClusterID string `json:"clusterID"` KeywordType InstanceKeywordType `json:"keywordType"` Keyword string `json:"keyword"` OrderBy InstanceOrderBy `json:"orderBy"` Order Order `json:"order"` PageNo int `json:"pageNo"` PageSize int `json:"pageSize"` TotalCount int `json:"totalCount"` InstanceList []*Instance `json:"instanceList"` }
InstancePage - 节点分页查询返回
type InstanceSet ¶
type InstanceSet struct { InstanceSpec types.InstanceSpec `json:"instanceSpec"` Count int `json:"count"` }
type InstanceStatus ¶
type InstanceStatus struct { Machine Machine `json:"machine"` InstancePhase types.InstancePhase `json:"instancePhase"` MachineStatus types.ServerStatus `json:"machineStatus"` }
InstanceStatus - Instance Status
type InstanceTemplate ¶
type InstanceTemplate struct {
types.InstanceSpec `json:",inline"`
}
type Interface ¶
type Interface interface { CreateCluster(args *CreateClusterArgs) (*CreateClusterResponse, error) GetCluster(clusterID string) (*GetClusterResponse, error) DeleteCluster(args *DeleteClusterArgs) (*DeleteClusterResponse, error) ListClusters(args *ListClustersArgs) (*ListClustersResponse, error) CreateInstances(args *CreateInstancesArgs) (*CreateInstancesResponse, error) GetInstance(args *GetInstanceArgs) (*GetInstanceResponse, error) DeleteInstances(args *DeleteInstancesArgs) (*DeleteInstancesResponse, error) ListInstancesByPage(args *ListInstancesByPageArgs) (*ListInstancesResponse, error) CreateScaleUpInstanceGroupTask(args *CreateScaleUpInstanceGroupTaskArgs) (*CreateTaskResp, error) CreateScaleDownInstanceGroupTask(args *CreateScaleDownInstanceGroupTaskArgs) (*CreateTaskResp, error) GetClusterQuota() (*GetQuotaResponse, error) GetClusterNodeQuota(clusterID string) (*GetQuotaResponse, error) CheckContainerNetworkCIDR(args *CheckContainerNetworkCIDRArgs) (*CheckContainerNetworkCIDRResponse, error) CheckClusterIPCIDR(args *CheckClusterIPCIDRArgs) (*CheckClusterIPCIDRResponse, error) RecommendContainerCIDR(args *RecommendContainerCIDRArgs) (*RecommendContainerCIDRResponse, error) RecommendClusterIPCIDR(args *RecommendClusterIPCIDRArgs) (*RecommendClusterIPCIDRResponse, error) GetTask(args *GetTaskArgs) (*GetTaskResp, error) ListTasks(args *ListTasksArgs) (*ListTaskResp, error) GetInstanceCRD(args *GetInstanceCRDArgs) (*GetInstanceCRDResponse, error) UpdateInstanceCRD(args *UpdateInstanceCRDRequest) (*CommonResponse, error) }
Interface 定义 CCE V2 SDK
type KubeConfigType ¶ added in v0.9.25
type KubeConfigType string
KubeConfigType - kube config 类型
const ( // KubeConfigTypeInternal 使用 BLB FloatingIP KubeConfigTypeInternal KubeConfigType = "internal" // KubeConfigTypeVPC 使用 BLB VPCIP KubeConfigTypeVPC KubeConfigType = "vpc" // KubeConfigTypePublic 使用 BLB EIP KubeConfigTypePublic KubeConfigType = "public" )
type ListAddonArgs ¶ added in v0.9.172
type ListClustersArgs ¶
type ListClustersArgs struct { KeywordType ClusterKeywordType Keyword string OrderBy ClusterOrderBy Order Order PageNum int PageSize int }
type ListClustersResponse ¶
type ListClustersResponse struct { ClusterPage *ClusterPage `json:"clusterPage"` RequestID string `json:"requestID"` }
ListClustersResponse - List 用户 Cluster 返回
type ListInstanceByInstanceGroupIDArgs ¶ added in v0.9.20
type ListInstanceGroupPage ¶ added in v0.9.20
type ListInstanceGroupPage struct { PageNo int `json:"pageNo"` PageSize int `json:"pageSize"` TotalCount int `json:"totalCount"` List []*InstanceGroup `json:"list"` }
type ListInstanceGroupResponse ¶ added in v0.9.20
type ListInstanceGroupResponse struct { CommonResponse Page ListInstanceGroupPage `json:"page"` }
type ListInstanceGroupsArgs ¶ added in v0.9.20
type ListInstanceGroupsArgs struct { ClusterID string ListOption *InstanceGroupListOption }
type ListInstancesByInstanceGroupIDPage ¶ added in v0.9.20
type ListInstancesByInstanceGroupIDResponse ¶ added in v0.9.20
type ListInstancesByInstanceGroupIDResponse struct { CommonResponse Page ListInstancesByInstanceGroupIDPage `json:"page"` }
type ListInstancesByPageArgs ¶
type ListInstancesByPageArgs struct { ClusterID string Params *ListInstancesByPageParams }
type ListInstancesByPageParams ¶
type ListInstancesByPageParams struct { KeywordType InstanceKeywordType `json:"keywordType"` Keyword string `json:"keyword"` OrderBy InstanceOrderBy `json:"orderBy"` Order Order `json:"order"` PageNo int `json:"pageNo"` PageSize int `json:"pageSize"` EnableInternalFields bool `json:"enableInternalFields"` }
ListInstancesByPageParams - 分页查询集群实例列表参数
type ListInstancesResponse ¶
type ListInstancesResponse struct { InstancePage *InstancePage `json:"instancePage"` RequestID string `json:"requestID"` }
ListInstancesResponse - List Instances 返回
type ListTaskPage ¶ added in v0.9.76
type ListTaskResp ¶ added in v0.9.76
type ListTaskResp struct { CommonResponse Page ListTaskPage }
type ListTasksArgs ¶ added in v0.9.76
type Machine ¶
type Machine struct { InstanceID string `json:"instanceID"` InstanceUUID string `json:"instanceUUID,omitempty"` OrderID string `json:"orderID,omitempty"` MountList []types.MountConfig `json:"mountList,omitempty"` VPCIP string `json:"vpcIP,omitempty"` VPCIPIPv6 string `json:"vpcIPIPv6,omitempty"` EIP string `json:"eip,omitempty"` K8SNodeName string `json:"k8sNodeName,omitempty"` Hostname string `json:"hostname,omitempty"` }
Machine - 定义机器相关信息
type NetworkConflictInfo ¶
type NetworkConflictInfo struct { IsConflict bool `json:"isConflict"` ErrMsg string `json:"errMsg"` ContainerCIDRConflict *ContainerCIDRConflict `json:"containerCIDRConflict"` // 容器网段冲突信息 ClusterIPCIDRConflict *ClusterIPCIDRConflict `json:"clusterIPCIDRConflict"` // ClusterIP 网段冲突信息 }
NetworkConflictInfo 容器网络整体配置冲突信息
type NetworkConflictType ¶
type NetworkConflictType string
NetworkConflictType 冲突类型
const ( // ContainerCIDRAndNodeCIDRConflict 容器网段和本集群的节点网段冲突 ContainerCIDRAndNodeCIDRConflict NetworkConflictType = "ContainerCIDRAndNodeCIDR" // ContainerCIDRAndExistedClusterContainerCIDRConflict 容器网段和 VPC 内已有集群的容器网段冲突 ContainerCIDRAndExistedClusterContainerCIDRConflict NetworkConflictType = "ContainerCIDRAndExistedClusterContainerCIDR" // ContainerCIDRAndVPCRouteConflict 容器网段与 VPC 路由冲突 ContainerCIDRAndVPCRouteConflict NetworkConflictType = "ContainerCIDRAndVPCRoute" // ClusterIPCIDRAndNodeCIDRConflict ClusterIP 网段与本集群节点网段冲突 ClusterIPCIDRAndNodeCIDRConflict NetworkConflictType = "ClusterIPCIDRAndNodeCIDR" // ClusterIPCIDRAndContainerCIDRConflict ClusterIP 网段与本集群容器网段冲突 ClusterIPCIDRAndContainerCIDRConflict NetworkConflictType = "ClusterIPCIDRAndContainerCIDR" )
type ObjectMeta ¶ added in v0.9.103
type PauseDetail ¶ added in v0.9.20
type PrivateNetString ¶
type PrivateNetString string
PrivateNetString IPv4/IPv6 私有网络地址类型
const ( // PrivateIPv4Net10 - IPv4 10 段 PrivateIPv4Net10 PrivateNetString = "10.0.0.0/8" // PrivateIPv4Net172 - IPv4 172 段 PrivateIPv4Net172 PrivateNetString = "172.16.0.0/12" // PrivateIPv4Net192 - IPv4 192 段 PrivateIPv4Net192 PrivateNetString = "192.168.0.0/16" // PrivateIPv6Net - IPv6 段 PrivateIPv6Net PrivateNetString = "fc00::/7" )
type RecommendClusterIPCIDRArgs ¶
type RecommendClusterIPCIDRArgs struct { VPCCIDR string `json:"vpcCIDR"` VPCCIDRIPv6 string `json:"vpcCIDRIPv6"` ContainerCIDR string `json:"containerCIDR"` ContainerCIDRIPv6 string `json:"containerCIDRIPv6"` // ClusterMaxServiceNum 集群 Service 最大规模 ClusterMaxServiceNum int `json:"clusterMaxServiceNum"` // PrivateNetCIDRs 候选的 ClusterIP 网段列表,只能从 [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16] 里选择 PrivateNetCIDRs []PrivateNetString `json:"privateNetCIDRs"` PrivateNetCIDRIPv6s []PrivateNetString `json:"privateNetCIDRIPv6s"` IPVersion types.ContainerNetworkIPType `json:"ipVersion"` // if not set, set ipv4 }
RecommendClusterIPCIDRRequest 推荐 ClusterIP 网段的请求参数
type RecommendClusterIPCIDRResponse ¶
type RecommendClusterIPCIDRResponse struct { RecommendedClusterIPCIDRs []string `json:"recommendedClusterIPCIDRs"` RecommendedClusterIPCIDRIPv6s []string `json:"recommendedClusterIPCIDRIPv6s"` IsSuccess bool `json:"isSuccess"` ErrMsg string `json:"errMsg"` RequestID string `json:"requestID"` }
RecommendClusterIPCIDRResponse 推荐 ClusterIP 网段的响应
type RecommendContainerCIDRArgs ¶
type RecommendContainerCIDRArgs struct { VPCID string `json:"vpcID"` VPCCIDR string `json:"vpcCIDR"` VPCCIDRIPv6 string `json:"vpcCIDRIPv6"` // ClusterMaxNodeNum 集群节点的最大规模 ClusterMaxNodeNum int `json:"clusterMaxNodeNum"` MaxPodsPerNode int `json:"maxPodsPerNode"` // PrivateNetCIDRs 候选的容器网段列表,只能从 [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16] 里选择 PrivateNetCIDRs []PrivateNetString `json:"privateNetCIDRs"` PrivateNetCIDRIPv6s []PrivateNetString `json:"privateNetCIDRIPv6s"` K8SVersion types.K8SVersion `json:"k8sVersion"` IPVersion types.ContainerNetworkIPType `json:"ipVersion"` // if not set, set ipv4 }
RecommendContainerCIDRRequest 推荐容器网段的请求参数
type RecommendContainerCIDRResponse ¶
type RecommendContainerCIDRResponse struct { RecommendedContainerCIDRs []string `json:"recommendedContainerCIDRs"` RecommendedContainerCIDRIPv6s []string `json:"recommendedContainerCIDRIPv6s"` IsSuccess bool `json:"isSuccess"` ErrMsg string `json:"errMsg"` RequestID string `json:"requestID"` }
RecommendContainerCIDRResponse 推荐容器网段的响应
type ReconcileResponse ¶ added in v0.9.168
type ReconcileResponse struct { Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` TraceID string `json:"traceID,omitempty"` // message里可能有底层返回的requestID,这里用TraceID作区分 Suggestion string `json:"suggestion,omitempty"` }
ReconcileResponse controller reconcile 流程中暴露出去的信息
type ShrinkPolicy ¶ added in v0.9.20
type ShrinkPolicy string
type Step ¶ added in v0.9.168
type Step struct { StepName string `json:"stepName"` StepStatus string `json:"stepStatus"` StepInfo }
Step - 集群操作步骤
type StepInfo ¶ added in v0.9.168
type StepInfo struct { Ready bool `json:"ready,omitempty"` StartTime time.Time `json:"startTime,omitempty"` // 第一次开始时间 FinishedTime time.Time `json:"finishedTime,omitempty"` // 最后一次成功时间 CostSeconds int `json:"costSeconds,omitempty"` // 花费时间 RetryCount int `json:"retryCount,omitempty"` // 重试次数 TraceID string `json:"traceID,omitempty"` // cce 侧 requestID, errorInfo 暴露后,去除该字段 ErrMsg string `json:"errMsg,omitempty"` // 失败信息 ErrorInfo ReconcileResponse `json:"errInfo,omitempty"` // 失败信息 }
StepInfo - 步骤信息
type SyncInstancesResponse ¶ added in v0.9.172
type UninstallAddonArgs ¶ added in v0.9.172
type UninstallAddonArgs struct { Name string `json:"name"` ClusterID string `json:"clusterID"` InstanceName string `json:"instanceName,omitempty"` }
UninstallAddonArgs 组件卸载请求 Body 内容
type UpdateAddonArgs ¶ added in v0.9.172
type UpdateAutoscalerArgs ¶ added in v0.9.25
type UpdateAutoscalerArgs struct { ClusterID string AutoscalerConfig ClusterAutoscalerConfig }
type UpdateAutoscalerResponse ¶ added in v0.9.25
type UpdateAutoscalerResponse struct {
CommonResponse
}
type UpdateClusterCRDArgs ¶ added in v0.9.107
type UpdateClusterCRDArgs struct {
Cluster *ClusterCRD `json:"cluster"`
}
type UpdateClusterCRDResponses ¶ added in v0.9.107
type UpdateClusterCRDResponses struct { }
type UpdateClusterResponse ¶
type UpdateClusterResponse struct { Cluster *Cluster `json:"cluster"` RequestID string `json:"requestID"` }
UpdateClusterResponse - 更新 Cluster 返回
type UpdateInstanceArgs ¶ added in v0.9.25
type UpdateInstanceArgs struct { ClusterID string InstanceID string InstanceSpec *types.InstanceSpec }
type UpdateInstanceCRDRequest ¶ added in v0.9.103
type UpdateInstanceCRDRequest struct {
Instance *InstanceCRD `json:"instance"`
}
type UpdateInstanceGroupClusterAutoscalerSpecArgs ¶ added in v0.9.20
type UpdateInstanceGroupClusterAutoscalerSpecArgs struct { ClusterID string InstanceGroupID string Request *ClusterAutoscalerSpec }
type UpdateInstanceGroupClusterAutoscalerSpecResponse ¶ added in v0.9.20
type UpdateInstanceGroupClusterAutoscalerSpecResponse struct {
CommonResponse
}
type UpdateInstanceGroupReplicasArgs ¶ added in v0.9.20
type UpdateInstanceGroupReplicasArgs struct { ClusterID string InstanceGroupID string Request *UpdateInstanceGroupReplicasRequest }
type UpdateInstanceGroupReplicasRequest ¶ added in v0.9.20
type UpdateInstanceGroupReplicasRequest struct { Replicas int `json:"replicas"` InstanceIDs []string `json:"instanceIDs"` DeleteInstance bool `json:"deleteInstance"` DeleteOption *types.DeleteOption `json:"deleteOption,omitempty"` }
type UpdateInstanceGroupReplicasResponse ¶ added in v0.9.20
type UpdateInstanceGroupReplicasResponse struct {
CommonResponse
}
type UpdateInstancesResponse ¶
type UpdateInstancesResponse struct { Instance *Instance `json:"instance"` RequestID string `json:"requestID"` }
UpdateInstancesResponse - 更新 Instances 返回
type UpdatePolicy ¶ added in v0.9.20
type UpdatePolicy string
type UpgradeAddonArgs ¶ added in v0.9.172
type UpgradeAddonArgs struct { Name string `json:"name,omitempty"` ClusterID string `json:"clusterID"` TargetVersion string `json:"targetVersion,omitempty"` AddOnInstanceName string `json:"instanceName,omitempty"` Params string `json:"params,omitempty"` }
UpgradeAddonArgs 组件升级请求 Body 内容