provider

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AnnotationLbProtocol   = "service.beta.kubernetes.io/cds-load-balancer-protocol"
	AnnotationLbType       = "service.beta.kubernetes.io/cds-load-balancer-types"
	AnnotationLbSpec       = "service.beta.kubernetes.io/cds-load-balancer-specification"
	AnnotationLbBandwidth  = "service.beta.kubernetes.io/cds-load-balancer-bandwidth"
	AnnotationLbEip        = "service.beta.kubernetes.io/cds-load-balancer-eip"
	AnnotationLbAlgorithm  = "service.beta.kubernetes.io/cds-load-balancer-algorithm"
	AnnotationLbSubjectId  = "service.beta.kubernetes.io/cds-load-balancer-subject-id"
	AnnotationLbListen     = "service.eks.listen"
	LbNetTypeWan           = "wan"
	LbNetTypeWanLan        = "wan_lan"
	LbBillingMethodCostPay = "0" // 按需计费
	LabelNodeAz            = "node.kubernetes.io/node.az"
	LabelNodeAzCode        = "node.kubernetes.io/node.az-code"
	LbTaskSuccess          = "success"
	LbTakError             = "error"
	BillingType            = "number"
	BandwidthShared        = "shared"
)
View Source
const (
	LBSpecStandard = "standard" // 标准型
	LBSpecHigh     = "high"     // 高阶型
	LBSpecSuper    = "super"    // 超强型
	LBSpecExtreme  = "extreme"  // 至强型

	LBSpecNameStandard = "标准型"
	LBSpecNameHigh     = "高阶型"
	LBSpecNameSuper    = "超强型"
	LBSpecNameExtreme  = "至强型"
)
View Source
const (
	IpTypeInternal = "InternalIP"
	PlatformEks    = "eks"

	UpdateListenFull  = "full"  // 全量更新
	UpdateListenExact = "exact" // 精确更新

	RsTypeEks = "eks"
)

Variables

This section is empty.

Functions

func SlbName

func SlbName(svcName, namespace, uid string) string

SlbName 通过hash值的方式,计算slb的名称,让slb名称具有一致性和独立性

Types

type Cloud

type Cloud struct {
}

func (*Cloud) Clusters

func (cloud *Cloud) Clusters() (cloudprovider.Clusters, bool)

func (*Cloud) HasClusterID

func (cloud *Cloud) HasClusterID() bool

func (*Cloud) Initialize

func (cloud *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})

func (*Cloud) Instances

func (cloud *Cloud) Instances() (cloudprovider.Instances, bool)

func (*Cloud) InstancesV2

func (cloud *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool)

func (*Cloud) LoadBalancer

func (cloud *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)

func (*Cloud) ProviderName

func (cloud *Cloud) ProviderName() string

func (*Cloud) Routes

func (cloud *Cloud) Routes() (cloudprovider.Routes, bool)

func (*Cloud) Zones

func (cloud *Cloud) Zones() (cloudprovider.Zones, bool)

type Clusters

type Clusters struct {
}

func (*Clusters) ListClusters

func (c *Clusters) ListClusters(ctx context.Context) ([]string, error)

func (*Clusters) Master

func (c *Clusters) Master(ctx context.Context, clusterName string) (string, error)

type InformerUser

type InformerUser struct {
}

func (*InformerUser) SetInformers

func (i *InformerUser) SetInformers(informerFactory informers.SharedInformerFactory)

type Instances

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

func (*Instances) AddSSHKeyToAllInstances

func (i *Instances) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error

func (*Instances) CurrentNodeName

func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error)

func (*Instances) InstanceExistsByProviderID

func (i *Instances) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)

func (*Instances) InstanceID

func (i *Instances) InstanceID(ctx context.Context, nodeName types.NodeName) (string, error)

func (*Instances) InstanceShutdownByProviderID

func (i *Instances) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)

func (*Instances) InstanceType

func (i *Instances) InstanceType(ctx context.Context, name types.NodeName) (string, error)

func (*Instances) InstanceTypeByProviderID

func (i *Instances) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error)

func (*Instances) NodeAddresses

func (i *Instances) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)

func (*Instances) NodeAddressesByProviderID

func (i *Instances) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)

type InstancesV2

type InstancesV2 struct {
}

func (*InstancesV2) InstanceExists

func (i *InstancesV2) InstanceExists(ctx context.Context, node *v1.Node) (bool, error)

func (*InstancesV2) InstanceMetadata

func (i *InstancesV2) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)

func (*InstancesV2) InstanceShutdown

func (i *InstancesV2) InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error)

type LoadBalancer

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

func (*LoadBalancer) EnsureLoadBalancer

func (l *LoadBalancer) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)

EnsureLoadBalancer 创建lb

func (*LoadBalancer) EnsureLoadBalancerDeleted

func (l *LoadBalancer) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error

func (*LoadBalancer) GetLoadBalancer

func (l *LoadBalancer) GetLoadBalancer(ctx context.Context, clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)

GetLoadBalancer 查询lb

func (*LoadBalancer) GetLoadBalancerName

func (l *LoadBalancer) GetLoadBalancerName(ctx context.Context, clusterName string, service *v1.Service) string

GetLoadBalancerName 获取lb名称

func (*LoadBalancer) UpdateLoadBalancer

func (l *LoadBalancer) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error

type PVLabeler

type PVLabeler struct {
}

func (*PVLabeler) GetLabelsForVolume

func (p *PVLabeler) GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVolume) (map[string]string, error)

type Routes

type Routes struct {
}

func (*Routes) CreateRoute

func (r *Routes) CreateRoute(ctx context.Context, clusterName string, nameHint string, route *cloudprovider.Route) error

func (*Routes) DeleteRoute

func (r *Routes) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error

func (*Routes) ListRoutes

func (r *Routes) ListRoutes(ctx context.Context, clusterName string) ([]*cloudprovider.Route, error)

type Zones

type Zones struct {
}

func (*Zones) GetZone

func (z *Zones) GetZone(ctx context.Context) (cloudprovider.Zone, error)

func (*Zones) GetZoneByNodeName

func (z *Zones) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)

func (*Zones) GetZoneByProviderID

func (z *Zones) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)

Jump to

Keyboard shortcuts

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