ack

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterStatusRunning  = "running"
	ClusterStatusError    = "failed"
	ClusterStatusUpdating = "updating"
)

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, client *cs.Client, config *ackv1.ACKClusterConfig) error

Create creates an upstream ACK cluster.

func GetACKClient

func GetACKClient(regionID, accessKeyID, accessKeySecret string) (*ackapi.Client, error)

func NewCsAPIRequest

func NewCsAPIRequest(apiName, method string) *requests.CommonRequest

NewCsAPIRequest constructs general aliyun sdk request

func ProcessRequest

func ProcessRequest(svc *cs.Client, request *requests.CommonRequest, obj interface{}) error

func RemoveCluster

func RemoveCluster(ctx context.Context, client *cs.Client, config *ackv1.ACKClusterConfig) error

RemoveCluster attempts to delete a cluster and retries the delete request if the cluster is busy.

func TickerContext

func TickerContext(ctx context.Context, duration time.Duration) <-chan time.Time

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 UpdateMasterKubernetesVersion

func UpdateMasterKubernetesVersion(ctx context.Context, client *cs.Client, config *ackv1.ACKClusterConfig, upstreamSpec *ackv1.ACKClusterConfigSpec) (Status, error)

UpdateMasterKubernetesVersion updates the Kubernetes version for the control plane. This must occur before the Kubernetes version is changed on the nodes.

Jump to

Keyboard shortcuts

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