cce

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterStatusAvailable      = "Available"      // 可用
	ClusterStatusUnavailable    = "Unavailable"    // 不可用,集群异常,需手动删除
	ClusterStatusScalingUp      = "ScalingUp"      // 扩容中
	ClusterStatusScalingDown    = "ScalingDown"    // 缩容中
	ClusterStatusCreating       = "Creating"       // 创建中
	ClusterStatusDeleting       = "Deleting"       // 删除中
	ClusterStatusUpgrading      = "Upgrading"      // 升级中
	ClusterStatusResizing       = "Resizing"       // 规格变更中
	ClusterStatusRollingBack    = "RollingBack"    // 回滚中
	ClusterStatusRollbackFailed = "RollbackFailed" // 回滚异常
	ClusterStatusEmpty          = "Empty"          // 集群无任何资源
)
View Source
const (
	NodePoolIDAnnotationKey = "kubernetes.io/node-pool.id"
)

Variables

This section is empty.

Functions

func CreateAddonInstance

func CreateAddonInstance(
	client *cce.CceClient,
) (*model.CreateAddonInstanceResponse, error)

TODO:

func CreateCluster

func CreateCluster(
	client *cce.CceClient, config *ccev1.CCEClusterConfig,
) (*model.CreateClusterResponse, error)

func CreateNodePool

func CreateNodePool(
	client *cce.CceClient, clusterID string, nodePool *ccev1.CCENodePool,
) (*model.CreateNodePoolResponse, error)

func DeleteCluster

func DeleteCluster(client *cce.CceClient, ID string) (*model.DeleteClusterResponse, error)

func DeleteNode

func DeleteNode(
	client *cce.CceClient, clusterID string, nodeID string,
) (*model.DeleteNodeResponse, error)

func DeleteNodePool

func DeleteNodePool(
	client *cce.CceClient, clusterID, npID string,
) (*model.DeleteNodePoolResponse, error)

func GetClusterCert

func GetClusterCert(
	client *cce.CceClient, clusterID string, duration int32,
) (*model.CreateKubernetesClusterCertResponse, error)

func GetClusterClient

func GetClusterClient(
	client *cce.CceClient, clusterID string, duration int32,
) (kubernetes.Interface, error)

func GetClusterRestConfig

func GetClusterRestConfig(
	client *cce.CceClient, clusterID string, duration int32,
) (*rest.Config, error)

func GetCreateClusterRequest

func GetCreateClusterRequest(config *ccev1.CCEClusterConfig) *model.CreateClusterRequest

func GetCreateNodePoolRequest

func GetCreateNodePoolRequest(
	clusterID string, np *ccev1.CCENodePool,
) (*model.CreateNodePoolRequest, error)

func GetUpdateClusterRequest

func GetUpdateClusterRequest(config *ccev1.CCEClusterConfig) *model.UpdateClusterRequest

func GetUpdateNodePoolRequest

func GetUpdateNodePoolRequest(
	clusterID string, nodePool *ccev1.CCENodePool,
) *model.UpdateNodePoolRequest

func GetUpgradeClusterRequest

func GetUpgradeClusterRequest(config *ccev1.CCEClusterConfig) *model.UpgradeClusterRequest

func ListAddonInstances

func ListAddonInstances(
	client *cce.CceClient, clusterID, addonName string,
) (*model.ListAddonInstancesResponse, error)

func ListClusters

func ListClusters(client *cce.CceClient) (*model.ListClustersResponse, error)

func ListNodePools

func ListNodePools(
	client *cce.CceClient, clusterID string, showDefaultNP bool,
) (*model.ListNodePoolsResponse, error)

func ListNodes

func ListNodes(client *cce.CceClient, clusterID string) (*model.ListNodesResponse, error)

func NewCCEClient

func NewCCEClient(auth *common.ClientAuth) *cce.CceClient

func ResizeCluster added in v0.3.2

func ResizeCluster(
	client *cce.CceClient, ID, flavor, isAutoPay string,
) (*model.ResizeClusterResponse, error)

func ShowCluster

func ShowCluster(client *cce.CceClient, ID string) (*model.ShowClusterResponse, error)

func ShowNode

func ShowNode(
	client *cce.CceClient, clusterID, nodeID string,
) (*model.ShowNodeResponse, error)

func ShowNodePool

func ShowNodePool(
	client *cce.CceClient, clusterID, npID string,
) (*model.ShowNodePoolResponse, error)

func ShowUpgradeClusterTask

func ShowUpgradeClusterTask(
	client *cce.CceClient, clusterID string, taskID string,
) (*model.ShowUpgradeClusterTaskResponse, error)

func UpdateCluster

func UpdateCluster(
	client *cce.CceClient, config *ccev1.CCEClusterConfig,
) (*model.UpdateClusterResponse, error)

func UpdateNodePool

func UpdateNodePool(
	client *cce.CceClient, clusterID string, nodePool *ccev1.CCENodePool,
) (*model.UpdateNodePoolResponse, error)

func UpgradeCluster

func UpgradeCluster(
	client *cce.CceClient, config *ccev1.CCEClusterConfig,
) (*model.UpgradeClusterResponse, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL