aliyun

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "aliyun"

Variables

View Source
var (
	ErrorNotFound     = fmt.Errorf("Instance is not found")
	CloudInitInterval = 5 * time.Second
	CloudInitTimeout  = 3 * time.Minute
	// Aliyun doesn't allow tag keys starting with "aliyun"
	InitializedTagKey = "instance." + AliyunAnnotationPrefix + "initialized"
	SSHUsername       = "root"
	StateMap          = map[ecs.InstanceStatus]cluster.InstancePhase{
		ecs.Pending:  cluster.InstancePending,
		ecs.Starting: cluster.InstancePending,
		ecs.Running:  cluster.InstanceRunning,
		ecs.Stopping: cluster.InstanceFailed,
		ecs.Stopped:  cluster.InstanceFailed,
		ecs.Deleted:  cluster.InstanceFailed,
	}
)
View Source
var AliyunAnnotationPrefix = "aliyun." + cluster.AnnotationPrefix

Used in k8s annotations and labels

View Source
var NameKey = AliyunAnnotationPrefix + "name"

Node name as a tag on aliyun instance

Functions

This section is empty.

Types

type AliyunInstanceInitialized

type AliyunInstanceInitialized struct {
	Initialized bool `k8s:"instance-initialized"`
}

type AliyunInstanceOptions

type AliyunInstanceOptions struct {
	InternetMaxBandwidthIn  int    `k8s:"internet-max-bandwidth-in"`
	InternetMaxBandwidthOut int    `k8s:"internet-max-bandwidth-out"`
	SystemDiskSize          int    `k8s:"system-disk-size"`
	SystemDiskType          string `k8s:"system-disk-type"`
	UseSSH                  bool   `k8s:"use-ssh"`
}

type AliyunNetwork

type AliyunNetwork struct {
	VPC           string `k8s:"vpc-id"`
	VSwitch       string `k8s:"vswitch-id"`
	SecurityGroup string `k8s:"security-group-id"`
	RouteTable    string `k8s:"route-table-id"`
	Router        string `k8s:"router-id"`
	VPCIPRange    string `k8s:"vpc-ip-range"`
}

type ECS

type ECS interface {
	CreateInstance(*ecs.CreateInstanceArgs) (string, error)
	StopInstance(string, bool) error
	StartInstance(string) error
	DeleteInstance(string) error
	DescribeInstances(args *ecs.DescribeInstancesArgs) (instances []ecs.InstanceAttributesType, err error)
	DescribeInstanceAttribute(string) (*ecs.InstanceAttributesType, error)
	WaitForInstance(string, ecs.InstanceStatus, int) error
	ModifyInstanceAttribute(*ecs.ModifyInstanceAttributeArgs) error

	DescribeDisks(args *ecs.DescribeDisksArgs) (disks []ecs.DiskItemType, err error)
	ReInitDisk(string) error

	AllocatePublicIpAddress(string) (string, error)
	AllocateEipAddress(*ecs.AllocateEipAddressArgs) (string, string, error)
	WaitForEip(common.Region, string, ecs.EipStatus, int) error
	AssociateEipAddress(string, string) error
	DescribeEipAddress(string, string) (ecs.EipAddressSetType, error)
	UnassociateEipAddress(string, string) error
	ReleaseEipAddress(string) error

	CreateSecurityGroup(*ecs.CreateSecurityGroupArgs) (string, error)
	DeleteSecurityGroup(common.Region, string) error
	AuthorizeSecurityGroup(*ecs.AuthorizeSecurityGroupArgs) error
	AuthorizeSecurityGroupEgress(*ecs.AuthorizeSecurityGroupEgressArgs) error
	CreateVSwitch(*ecs.CreateVSwitchArgs) (string, error)
	DeleteVSwitch(string) error
	CreateVpc(*ecs.CreateVpcArgs) (*ecs.CreateVpcResponse, error)
	DeleteVpc(string) error
	WaitForVpcAvailable(common.Region, string, int) error

	AddTags(*ecs.AddTagsArgs) error
	RemoveTags(*ecs.RemoveTagsArgs) error
}

type EIP

type EIP struct {
	AllocationID string `k8s:"eip-allocation-id"`
}

type EIPOptions

type EIPOptions struct {
	Bandwidth          int    `k8s:"eip-bandwidth"`
	InternetChargeType string `k8s:"eip-internet-charge-type"`
}

type LogWriter

type LogWriter struct {
}

func (*LogWriter) Write

func (lr *LogWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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