aliyun

package
v0.0.0-...-54e3b16 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AliyunAnnotationPrefix = "aliyun.archon.kubeup.com/"
	ProviderName           = "aliyun"
)

Variables

View Source
var (
	OptionFSType    = "kubernetes.io/fsType"
	OptionReadWrite = "kubernetes.io/readwrite"

	APIPrefix   = "/dev/xvd"
	LocalPrefix = "/dev/vd"

	WaitInterval         = time.Second
	WaitForAttachTimeout = 10 * time.Second

	DefaultFSType   = "ext4"
	DriverName      = "aliyun/flexv"
	ProvisionerName = "archon.kubeup.com/aliyun"

	MinSizeTable = map[ecs.DiskCategory]int{
		ecs.DiskCategoryCloud:           5,
		ecs.DiskCategoryEphemeral:       5,
		ecs.DiskCategoryEphemeralSSD:    20,
		ecs.DiskCategoryCloudEfficiency: 20,
		ecs.DiskCategoryCloudSSD:        20,
	}
)

Functions

func NewProvider

func NewProvider() cloudprovider.Provider

Types

type AliyunLoadBalancerOptions

type AliyunLoadBalancerOptions struct {
	InternetChargeType        string `k8s:"internet-charge-type"`
	Bandwidth                 int    `k8s:"bandwidth"`
	HealthyThreshold          int    `k8s:"healthy-threshold"`
	UnhealthyThreshold        int    `k8s:"unhealthy-threshold"`
	HealthCheckConnectTimeout int    `k8s:"health-check-connect-timeout"`
	HealthCheckInterval       int    `k8s:"health-check-interval"`
}

type AliyunProvider

type AliyunProvider struct {
	// contains filtered or unexported fields
}

func (*AliyunProvider) Attach

func (p *AliyunProvider) Attach(options cloudprovider.VolumeOptions, node string) error

func (*AliyunProvider) Clusters

func (p *AliyunProvider) Clusters() (origcloudprovider.Clusters, bool)

func (*AliyunProvider) CreateRoute

func (w *AliyunProvider) CreateRoute(clusterName string, nameHint string, route *origcloudprovider.Route) (err error)

func (*AliyunProvider) Delete

func (p *AliyunProvider) Delete(pv *v1.PersistentVolume) error

func (*AliyunProvider) DeleteRoute

func (w *AliyunProvider) DeleteRoute(clusterName string, route *origcloudprovider.Route) (err error)

func (*AliyunProvider) Detach

func (p *AliyunProvider) Detach(deviceName string, node string) error

Here the deviceName is actually the volumeName from GetVolumeName. see operation-generator.go

func (*AliyunProvider) EnsureLoadBalancer

func (p *AliyunProvider) EnsureLoadBalancer(clusterName string, service *api.Service, nodes []*api.Node) (*api.LoadBalancerStatus, error)

func (*AliyunProvider) EnsureLoadBalancerDeleted

func (p *AliyunProvider) EnsureLoadBalancerDeleted(clusterName string, service *api.Service) error

func (*AliyunProvider) GetLoadBalancer

func (p *AliyunProvider) GetLoadBalancer(clusterName string, service *api.Service) (status *api.LoadBalancerStatus, exists bool, err error)

func (*AliyunProvider) GetLoadBalancerName

func (p *AliyunProvider) GetLoadBalancerName(service *api.Service) string

Loadbalancer interface

func (*AliyunProvider) GetVolumeName

func (p *AliyunProvider) GetVolumeName(options cloudprovider.VolumeOptions) error

func (*AliyunProvider) GetZone

func (p *AliyunProvider) GetZone() (zone cloudprovider.Zone, err error)

func (*AliyunProvider) Init

func (p *AliyunProvider) Init() error

func (*AliyunProvider) Instances

func (p *AliyunProvider) Instances() (origcloudprovider.Instances, bool)

func (*AliyunProvider) IsAttached

func (p *AliyunProvider) IsAttached(options cloudprovider.VolumeOptions, node string) error

func (*AliyunProvider) ListRoutes

func (w *AliyunProvider) ListRoutes(clusterName string) (routes []*origcloudprovider.Route, err error)

func (*AliyunProvider) LoadBalancer

func (p *AliyunProvider) LoadBalancer() (origcloudprovider.LoadBalancer, bool)

func (*AliyunProvider) MountDevice

func (p *AliyunProvider) MountDevice(dir, device string, options cloudprovider.VolumeOptions) error

func (*AliyunProvider) ProviderName

func (p *AliyunProvider) ProviderName() string

func (*AliyunProvider) Provision

func (*AliyunProvider) ProvisionerName

func (p *AliyunProvider) ProvisionerName() string

func (*AliyunProvider) Routes

func (*AliyunProvider) ScrubDNS

func (p *AliyunProvider) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string)

func (*AliyunProvider) UnmountDevice

func (p *AliyunProvider) UnmountDevice(dir string) error

func (*AliyunProvider) UpdateLoadBalancer

func (p *AliyunProvider) UpdateLoadBalancer(clusterName string, service *api.Service, nodes []*api.Node) error

func (*AliyunProvider) Volume

func (p *AliyunProvider) Volume() (cloudprovider.Volume, bool)

func (*AliyunProvider) WaitForAttach

func (p *AliyunProvider) WaitForAttach(device string, options cloudprovider.VolumeOptions) error

WaitForAttach checks if the device is successfully attached on a given node. If there's no way to check, return not supported (ex. when it's another node and access key is not provided

func (*AliyunProvider) Zones

type NodeNameType

type NodeNameType string

NodeName describes the format of name for nodes in the cluster

const (
	// Use private ip address as the node name
	NodeNameTypePrivateIP NodeNameType = "private-ip"
	// Use hostname as the node name. This is the default behavior for k8s
	NodeNameTypeHostname NodeNameType = "hostname"
)

type StorageOptions

type StorageOptions struct {
	FSType   string `k8s:"fsType"`
	Category string `k8s:"diskCategory"`
}

Jump to

Keyboard shortcuts

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