aliup

package
v1.23.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagClusterName           = "KubernetesCluster"
	TagNameRolePrefix        = "k8s.io/role/"
	TagNameEtcdClusterPrefix = "k8s.io/etcd/"
	TagRoleMaster            = "master"
)

Variables

View Source
var KubernetesKopsIdentity = fmt.Sprintf("Kubernetes.Kops/%s", prj.Version)

This is for statistic purpose.

Functions

func FindAutoscalingGroups

func FindAutoscalingGroups(c ALICloud) ([]ess.ScalingGroupItemType, error)

FindAutoscalingGroups finds autoscaling groups matching the specified tags This isn't entirely trivial because autoscaling doesn't let us filter with as much precision as we would like

func FindRegion

func FindRegion(cluster *kops.Cluster) (string, error)

FindRegion determines the region from the zones specified in the cluster

func ZoneToVSwitchID

func ZoneToVSwitchID(VPCID string, zones []string, vswitchIDs []string) (map[string]string, error)

Types

type ALIAPITarget

type ALIAPITarget struct {
	Cloud ALICloud
}

func NewALIAPITarget

func NewALIAPITarget(cloud ALICloud) *ALIAPITarget

func (*ALIAPITarget) Finish

func (t *ALIAPITarget) Finish(taskMap map[string]fi.Task) error

func (*ALIAPITarget) ProcessDeletions

func (t *ALIAPITarget) ProcessDeletions() bool

type ALICloud

type ALICloud interface {
	fi.Cloud

	// Clients that use official Alicloud go sdk
	SLB() *slbnew.Client

	// Since package github.com/denverdino/aliyungo is not actively maintained,
	// clients that use github.com/denverdino/aliyungo, will be deprecated after
	// the above official SDK clients covers all of them
	EcsClient() *ecs.Client
	SlbClient() *slb.Client
	RamClient() *ram.RamClient
	EssClient() *ess.Client
	VpcClient() *ecs.Client
	AddClusterTags(tags map[string]string)
	GetTags(resourceId string, resourceType string) (map[string]string, error)
	CreateTags(resourceId string, resourceType string, tags map[string]string) error
	RemoveTags(resourceId string, resourceType string, tags map[string]string) error
	GetClusterTags() map[string]string
}

func NewALICloud

func NewALICloud(region string, tags map[string]string) (ALICloud, error)

NewALICloud returns a Cloud, expecting the env vars ALIYUN_ACCESS_KEY_ID && ALIYUN_ACCESS_KEY_SECRET NewALICloud will return an err if env vars are not defined

Jump to

Keyboard shortcuts

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