Documentation ¶
Index ¶
- Constants
- func Create(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec) error
- func CreateNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, ...) (*ackapi.CreateClusterNodePoolResponseBody, error)
- func DeleteNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, nodePoolId string) (*ackapi.DeleteClusterNodepoolResponse, error)
- func GetACKClient(regionID, accessKeyID, accessKeySecret string) (*sdk.Client, error)
- func GetCluster(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClusterDetailResponseBody, error)
- func GetClusterNodes(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, npId string) (*ackapi.DescribeClusterNodesResponseBody, error)
- func GetClusterWithParams(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*map[string]interface{}, error)
- func GetClusters(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClustersV1ResponseBody, error)
- func GetNodePools(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClusterNodePoolsResponseBody, error)
- func GetUserConfig(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClusterUserKubeconfigResponseBody, error)
- func ProcessRequest(svc *sdk.Client, request *requests.CommonRequest, obj interface{}) error
- func RemoveCluster(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec) error
- func ScaleDownNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, nodeNames []string) error
- func ScaleUpNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, ...) (*ackapi.ModifyClusterNodePoolResponseBody, error)
- func ToNodePoolConfigInfo(nodePoolInfo *ackapi.DescribeClusterNodePoolsResponseBody) ([]ackv1.NodePoolInfo, error)
- func UpdateNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, ...) (*ackapi.ModifyClusterNodePoolResponse, error)
- type Status
Constants ¶
View Source
const ( DefaultACKAPIVersion = "2015-12-15" DefaultNodePoolName = "default-nodepool" )
View Source
const ( TaskStatusSuccess = "success" TaskStatusRunning = "running" TaskStatusFailed = "failed" )
State of task
View Source
const ( ClusterStatusRunning = "running" ClusterStatusError = "failed" ClusterStatusUpdating = "updating" ClusterStatusScaling = "scaling" ClusterStatusRemoving = "removing" )
State of instance
View Source
const ( NodePoolStatusActive = "active" NodePoolStatusInitial = "initial" NodePoolStatusScaling = "scaling" NodePoolStatusRemoving = "removing" NodePoolStatusDeleting = "deleting" NodePoolStatusUpdating = "updating" )
State of node pool
View Source
const ( WaitingErrorCode = "Throttling" // "Throttling.User" and "Throttling.API" WaitingErrorMsg = "Request was denied due to user flow control" // can not call api for now WaitingStatusCode = "InvalidStatus" // "InvalidStatus.Forbidden" and "InvalidStatus.Unsupported" WaitingStatusMsg = "cannot operate cluster where state is" // state of resource not allow operation now )
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec) error
Create creates an upstream ACK cluster.
func CreateNodePool ¶
func CreateNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, npConfig *ackv1.NodePoolInfo) (*ackapi.CreateClusterNodePoolResponseBody, error)
func DeleteNodePool ¶
func DeleteNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, nodePoolId string) (*ackapi.DeleteClusterNodepoolResponse, error)
func GetACKClient ¶
func GetCluster ¶
func GetCluster(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClusterDetailResponseBody, error)
GetCluster returns cluster info
func GetClusterNodes ¶
func GetClusterNodes(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, npId string) (*ackapi.DescribeClusterNodesResponseBody, error)
func GetClusterWithParams ¶
func GetClusterWithParams(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*map[string]interface{}, error)
GetClusterWithParams returns cluster info map with params and output fields
func GetClusters ¶
func GetClusters(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClustersV1ResponseBody, error)
GetClusters returns cluster info by cluster name
func GetNodePools ¶
func GetNodePools(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClusterNodePoolsResponseBody, error)
func GetUserConfig ¶
func GetUserConfig(svc *sdk.Client, state *ackv1.ACKClusterConfigSpec) (*ackapi.DescribeClusterUserKubeconfigResponseBody, error)
GetUserConfig returns user config
func ProcessRequest ¶
func ProcessRequest(svc *sdk.Client, request *requests.CommonRequest, obj interface{}) error
func RemoveCluster ¶
func RemoveCluster(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec) error
RemoveCluster attempts to delete a cluster and retries the delete request if the cluster is busy.
func ScaleDownNodePool ¶
func ScaleUpNodePool ¶
func ScaleUpNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, npConfig *ackv1.NodePoolInfo, upNum int64) (*ackapi.ModifyClusterNodePoolResponseBody, error)
func ToNodePoolConfigInfo ¶
func ToNodePoolConfigInfo(nodePoolInfo *ackapi.DescribeClusterNodePoolsResponseBody) ([]ackv1.NodePoolInfo, error)
func UpdateNodePool ¶
func UpdateNodePool(client *sdk.Client, configSpec *ackv1.ACKClusterConfigSpec, npConfig *ackv1.NodePoolInfo) (*ackapi.ModifyClusterNodePoolResponse, error)
Types ¶
type Status ¶
type Status int
Status indicates how to handle the response from a request to update a resource
const ( // Changed means the request to change resource was accepted and change is in progress Changed Status = iota // Retry means the request to change resource was rejected due to an expected error and should be retried later Retry // NotChanged means the resource was not changed, either due to error or because it was unnecessary NotChanged )
Status indicators
func UpdateNodePoolBatch ¶
Click to show internal directories.
Click to hide internal directories.