Documentation ¶
Index ¶
- Constants
- Variables
- func Batch(m interface{}, cnt int, batch Func) error
- func BuildVirtualGroupFromRemoteAPI(lb *slb.LoadBalancerType, slbins *LoadBalancerClient) (vgroups, error)
- func BuildVirturalGroupFromService(client *LoadBalancerClient, service *v1.Service, slbins *slb.LoadBalancerType) *vgroups
- func CleanUPVGroupDirect(local *vgroups) error
- func CleanUPVGroupMerged(slbins *LoadBalancerClient, service *v1.Service, lb *slb.LoadBalancerType, ...) error
- func Contains(list []int, x int) bool
- func DefaultPreset()
- func EndpointIpsList(nodes *v1.Endpoints) []string
- func Ensure(v *vgroup, nodes interface{}) error
- func EnsureListeners(slbins *LoadBalancerClient, service *v1.Service, lb *slb.LoadBalancerType, ...) error
- func EnsureListenersDeleted(client ClientSLBSDK, service *v1.Service, lb *slb.LoadBalancerType, ...) error
- func EnsureVirtualGroups(vgrps *vgroups, nodes interface{}) error
- func ExpectAddressTypeNotEqual(f *FrameWork) error
- func ExpectExist(f *FrameWork) error
- func ExpectExistAndEqual(f *FrameWork) error
- func ExpectNotExist(f *FrameWork) error
- func ExtractAnnotationRequest(service *v1.Service) (*AnnotationRequest, *AnnotationRequest)
- func GetLocalService() *localService
- func GetPrivateZoneRecordCache() *kvstore
- func InitCache()
- func NodeList(nodes []*v1.Node) []string
- func PreSetCloudData(sets ...CloudDataMock)
- func PrettyJson(obj interface{}) string
- func Protocol(annotation string, port v1.ServicePort) (string, error)
- func RefreshToken(mgr *ClientMgr, token *Token) error
- func URIfromService(svc *v1.Service) string
- func WaitCreate(rc *RoutesClient, tableid string, route *ecs.CreateRouteEntryArgs) error
- func WaitDelete(rc *RoutesClient, tableid string, route *ecs.DeleteRouteEntryArgs) error
- func WaitForRouteEntryAvailable(client RouteSDK, routeid, tableid string) error
- type AkAuthToken
- type AnnotationRequest
- type ClientInstanceSDK
- type ClientMgr
- func (mgr *ClientMgr) Instances() *InstanceClient
- func (mgr *ClientMgr) LoadBalancers() *LoadBalancerClient
- func (mgr *ClientMgr) MetaData() IMetaData
- func (mgr *ClientMgr) PrivateZones() *PrivateZoneClient
- func (mgr *ClientMgr) Routes() *RoutesClient
- func (mgr *ClientMgr) Start(settoken func(mgr *ClientMgr, token *Token) error) error
- type ClientPVTZSDK
- type ClientSLBSDK
- type Cloud
- func (c *Cloud) AddSSHKeyToAllInstances(user string, keyData []byte) error
- func (c *Cloud) Clusters() (cloudprovider.Clusters, bool)
- func (c *Cloud) CreateRoute(clusterName string, nameHint string, tableid string, ...) error
- func (c *Cloud) CurrentNodeName(hostname string) (types.NodeName, error)
- func (c *Cloud) DeleteRoute(clusterName string, tableid string, route *cloudprovider.Route) error
- func (c *Cloud) EnsureLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (c *Cloud) EnsureLoadBalancerDeleted(clusterName string, service *v1.Service) error
- func (c *Cloud) EnsureLoadBalancerWithENI(name string, service *v1.Service, endpoint *v1.Endpoints) (*v1.LoadBalancerStatus, error)
- func (c *Cloud) ExternalID(nodeName types.NodeName) (string, error)
- func (c *Cloud) GetLoadBalancer(clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (c *Cloud) GetZone() (cloudprovider.Zone, error)
- func (c *Cloud) GetZoneByNodeName(nodeName types.NodeName) (cloudprovider.Zone, error)
- func (c *Cloud) GetZoneByProviderID(providerID string) (cloudprovider.Zone, error)
- func (c *Cloud) HasClusterID() bool
- func (c *Cloud) Initialize(builder ctrlclient.ControllerClientBuilder)
- func (c *Cloud) InstanceExistsByProviderID(providerID string) (bool, error)
- func (c *Cloud) InstanceID(nodeName types.NodeName) (string, error)
- func (c *Cloud) InstanceType(name types.NodeName) (string, error)
- func (c *Cloud) InstanceTypeByProviderID(providerID string) (string, error)
- func (c *Cloud) Instances() (cloudprovider.Instances, bool)
- func (c *Cloud) ListClusters() ([]string, error)
- func (c *Cloud) ListInstances(ids []string) (map[string]*node.CloudNodeAttribute, error)
- func (c *Cloud) ListRoutes(clusterName string, tableid string) ([]*cloudprovider.Route, error)
- func (c *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (c *Cloud) Master(clusterName string) (string, error)
- func (c *Cloud) NodeAddresses(name types.NodeName) ([]v1.NodeAddress, error)
- func (c *Cloud) NodeAddressesByProviderID(providerID string) ([]v1.NodeAddress, error)
- func (c *Cloud) ProviderName() string
- func (c *Cloud) RouteTables(clusterName string) ([]string, error)
- func (c *Cloud) Routes() (cloudprovider.Routes, bool)
- func (c *Cloud) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string)
- func (c *Cloud) SetInstanceTags(insid string, tags map[string]string) error
- func (c *Cloud) UpdateLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) error
- func (c *Cloud) UpdateLoadBalancerWithENI(name string, service *v1.Service, endpoint *v1.Endpoints) error
- func (c *Cloud) Zones() (cloudprovider.Zones, bool)
- type CloudConfig
- type CloudDataMock
- func WithENI() CloudDataMock
- func WithInstance() CloudDataMock
- func WithLoadBalancer() CloudDataMock
- func WithNewInstanceStore() CloudDataMock
- func WithNewLoadBalancerStore() CloudDataMock
- func WithNewRouteStore() CloudDataMock
- func WithRouteTableEntrySet() CloudDataMock
- func WithVRouter() CloudDataMock
- func WithVpcs() CloudDataMock
- type FrameWork
- func (f *FrameWork) CloudImpl() *Cloud
- func (f *FrameWork) Instance() *InstanceClient
- func (f *FrameWork) InstanceSDK() ClientInstanceSDK
- func (f *FrameWork) ListenerEqual(id string, p v1.ServicePort, proto string) error
- func (f *FrameWork) LoadBalancer() *LoadBalancerClient
- func (f *FrameWork) PVTZSDK() ClientPVTZSDK
- func (f *FrameWork) Route() *RoutesClient
- func (f *FrameWork) RouteSDK() RouteSDK
- func (f *FrameWork) Run(t *testing.T, describe string, ntype string, run func())
- func (f *FrameWork) RunDefault(t *testing.T, describe string)
- func (f *FrameWork) RunWithENI(t *testing.T, describe string)
- func (f *FrameWork) SLBSDK() ClientSLBSDK
- func (f *FrameWork) SLBSpecEqual(mlb *slb.LoadBalancerType) error
- type Func
- type IListener
- type IMetaData
- type InstanceClient
- type InstanceStore
- type LBStore
- type Listener
- type Listeners
- func BuildActionsForListeners(svc *v1.Service, service, console Listeners) (Listeners, error)
- func BuildListenersFromAPI(service *v1.Service, lb *slb.LoadBalancerType, client ClientSLBSDK, ...) (listeners Listeners)
- func BuildListenersFromService(svc *v1.Service, lb *slb.LoadBalancerType, client ClientSLBSDK, vgrps *vgroups) (Listeners, error)
- type LoadBalancerClient
- func (s *LoadBalancerClient) EnsureLoadBalanceDeleted(service *v1.Service) error
- func (s *LoadBalancerClient) EnsureLoadBalancer(service *v1.Service, nodes interface{}, vswitchid string) (*slb.LoadBalancerType, error)
- func (s *LoadBalancerClient) UpdateDefaultServerGroup(backends interface{}, lb *slb.LoadBalancerType) error
- func (s *LoadBalancerClient) UpdateLoadBalancer(service *v1.Service, nodes interface{}, withVgroup bool) error
- type NamedKey
- type OptionsFunc
- type PrivateZoneClient
- func (s *PrivateZoneClient) EnsurePrivateZoneRecord(service *v1.Service, ip string, ipVersion slb.AddressIPVersionType) (zone *pvtz.DescribeZoneInfoResponse, record *pvtz.ZoneRecordType, err error)
- func (s *PrivateZoneClient) EnsurePrivateZoneRecordDeleted(service *v1.Service, ip string, ipVersion slb.AddressIPVersionType) error
- type RamRoleToken
- type RouteSDK
- type RouteStore
- type RoutesClient
- func (r *RoutesClient) CreateRoute(tabid string, route *cloudprovider.Route, region common.Region, vpcid string) error
- func (r *RoutesClient) DeleteRoute(tabid string, route *cloudprovider.Route, region common.Region) error
- func (r *RoutesClient) Error(e error) string
- func (r *RoutesClient) ListRoutes(tableid string) ([]*cloudprovider.Route, error)
- func (r *RoutesClient) RouteTables() ([]string, error)
- func (r *RoutesClient) WithVPC(vpcid string, tableids string) error
- type ServiceToken
- type Token
- type TokenAuth
Constants ¶
const ( ENI_ID = "eni-abcdef1122344" ENI_ADDR_1 = "192.168.0.1" ENI_ADDR_2 = "192.168.0.2" )
const ( // ServiceAnnotationPrefix prefix of service annotation ServiceAnnotationPrefix = "service.beta.kubernetes.io/alibaba-cloud-" // ServiceAnnotationLegacyPrefix legacy prefix of service annotation ServiceAnnotationLegacyPrefix = "service.beta.kubernetes.io/alicloud-" // ServiceAnnotationLoadBalancerPrefix loadbalancer prefix ServiceAnnotationLoadBalancerPrefix = ServiceAnnotationPrefix + "loadbalancer-" // ServiceAnnotationPrivateZonePrefix private zone prefix ServiceAnnotationPrivateZonePrefix = ServiceAnnotationPrefix + "private-zone-" // ServiceAnnotationLoadBalancerAclStatus enable or disable acl on all listener ServiceAnnotationLoadBalancerAclStatus = ServiceAnnotationLoadBalancerPrefix + "acl-status" // ServiceAnnotationLoadBalancerAclID acl id ServiceAnnotationLoadBalancerAclID = ServiceAnnotationLoadBalancerPrefix + "acl-id" // ServiceAnnotationLoadBalancerAclType acl type, black or white ServiceAnnotationLoadBalancerAclType = ServiceAnnotationLoadBalancerPrefix + "acl-type" // ServiceAnnotationLoadBalancerProtocolPort protocol port ServiceAnnotationLoadBalancerProtocolPort = ServiceAnnotationLoadBalancerPrefix + "protocol-port" // ServiceAnnotationLoadBalancerAddressType loadbalancer address type ServiceAnnotationLoadBalancerAddressType = ServiceAnnotationLoadBalancerPrefix + "address-type" // ServiceAnnotationLoadBalancerVswitch loadbalancer vswitch id ServiceAnnotationLoadBalancerVswitch = ServiceAnnotationLoadBalancerPrefix + "vswitch-id" // ServiceAnnotationLoadBalancerForwardPort loadbalancer forward port ServiceAnnotationLoadBalancerForwardPort = ServiceAnnotationLoadBalancerPrefix + "forward-port" // ServiceAnnotationLoadBalancerSLBNetworkType loadbalancer network type ServiceAnnotationLoadBalancerSLBNetworkType = ServiceAnnotationLoadBalancerPrefix + "slb-network-type" // ServiceAnnotationLoadBalancerChargeType lb charge type ServiceAnnotationLoadBalancerChargeType = ServiceAnnotationLoadBalancerPrefix + "charge-type" // ServiceAnnotationLoadBalancerId lb id ServiceAnnotationLoadBalancerId = ServiceAnnotationLoadBalancerPrefix + "id" // ServiceAnnotationLoadBalancerBackendLabel backend labels ServiceAnnotationLoadBalancerBackendLabel = ServiceAnnotationLoadBalancerPrefix + "backend-label" // ServiceAnnotationLoadBalancerRegion region ServiceAnnotationLoadBalancerRegion = ServiceAnnotationLoadBalancerPrefix + "region" // ServiceAnnotationLoadBalancerMasterZoneID master zone id ServiceAnnotationLoadBalancerMasterZoneID = ServiceAnnotationLoadBalancerPrefix + "master-zoneid" // ServiceAnnotationLoadBalancerSlaveZoneID slave zone id ServiceAnnotationLoadBalancerSlaveZoneID = ServiceAnnotationLoadBalancerPrefix + "slave-zoneid" // ServiceAnnotationLoadBalancerBandwidth bandwidth ServiceAnnotationLoadBalancerBandwidth = ServiceAnnotationLoadBalancerPrefix + "bandwidth" // ServiceAnnotationLoadBalancerCertID cert id ServiceAnnotationLoadBalancerCertID = ServiceAnnotationLoadBalancerPrefix + "cert-id" // ServiceAnnotationLoadBalancerHealthCheckFlag health check flag ServiceAnnotationLoadBalancerHealthCheckFlag = ServiceAnnotationLoadBalancerPrefix + "health-check-flag" // ServiceAnnotationLoadBalancerHealthCheckType health check type ServiceAnnotationLoadBalancerHealthCheckType = ServiceAnnotationLoadBalancerPrefix + "health-check-type" // ServiceAnnotationLoadBalancerHealthCheckURI health check uri ServiceAnnotationLoadBalancerHealthCheckURI = ServiceAnnotationLoadBalancerPrefix + "health-check-uri" // ServiceAnnotationLoadBalancerHealthCheckConnectPort health check connect port ServiceAnnotationLoadBalancerHealthCheckConnectPort = ServiceAnnotationLoadBalancerPrefix + "health-check-connect-port" // ServiceAnnotationLoadBalancerHealthCheckHealthyThreshold health check healthy thresh hold ServiceAnnotationLoadBalancerHealthCheckHealthyThreshold = ServiceAnnotationLoadBalancerPrefix + "healthy-threshold" // ServiceAnnotationLoadBalancerHealthCheckUnhealthyThreshold health check unhealthy thresh hold ServiceAnnotationLoadBalancerHealthCheckUnhealthyThreshold = ServiceAnnotationLoadBalancerPrefix + "unhealthy-threshold" // ServiceAnnotationLoadBalancerHealthCheckInterval health check interval ServiceAnnotationLoadBalancerHealthCheckInterval = ServiceAnnotationLoadBalancerPrefix + "health-check-interval" // ServiceAnnotationLoadBalancerHealthCheckConnectTimeout health check connect timeout ServiceAnnotationLoadBalancerHealthCheckConnectTimeout = ServiceAnnotationLoadBalancerPrefix + "health-check-connect-timeout" // ServiceAnnotationLoadBalancerHealthCheckTimeout health check timeout ServiceAnnotationLoadBalancerHealthCheckTimeout = ServiceAnnotationLoadBalancerPrefix + "health-check-timeout" // ServiceAnnotationLoadBalancerHealthCheckDomain health check domain ServiceAnnotationLoadBalancerHealthCheckDomain = ServiceAnnotationLoadBalancerPrefix + "health-check-domain" // ServiceAnnotationLoadBalancerHealthCheckHTTPCode health check http code ServiceAnnotationLoadBalancerHealthCheckHTTPCode = ServiceAnnotationLoadBalancerPrefix + "health-check-httpcode" // ServiceAnnotationLoadBalancerAdditionalTags For example: "Key1=Val1,Key2=Val2,KeyNoVal1=,KeyNoVal2",same with aws ServiceAnnotationLoadBalancerAdditionalTags = ServiceAnnotationLoadBalancerPrefix + "additional-resource-tags" // ServiceAnnotationLoadBalancerOverrideListener force override listeners ServiceAnnotationLoadBalancerOverrideListener = ServiceAnnotationLoadBalancerPrefix + "force-override-listeners" // ServiceAnnotationLoadBalancerSpec slb spec ServiceAnnotationLoadBalancerSpec = ServiceAnnotationLoadBalancerPrefix + "spec" // ServiceAnnotationLoadBalancerScheduler slb scheduler ServiceAnnotationLoadBalancerScheduler = ServiceAnnotationLoadBalancerPrefix + "scheduler" // ServiceAnnotationLoadBalancerSessionStick sticky session ServiceAnnotationLoadBalancerSessionStick = ServiceAnnotationLoadBalancerPrefix + "sticky-session" // ServiceAnnotationLoadBalancerSessionStickType session sticky type ServiceAnnotationLoadBalancerSessionStickType = ServiceAnnotationLoadBalancerPrefix + "sticky-session-type" // ServiceAnnotationLoadBalancerCookieTimeout cookie timeout ServiceAnnotationLoadBalancerCookieTimeout = ServiceAnnotationLoadBalancerPrefix + "cookie-timeout" //ServiceAnnotationLoadBalancerCookie lb cookie ServiceAnnotationLoadBalancerCookie = ServiceAnnotationLoadBalancerPrefix + "cookie" // ServiceAnnotationLoadBalancerPersistenceTimeout persistence timeout ServiceAnnotationLoadBalancerPersistenceTimeout = ServiceAnnotationLoadBalancerPrefix + "persistence-timeout" //ServiceAnnotationLoadBalancerIPVersion ip version ServiceAnnotationLoadBalancerIPVersion = ServiceAnnotationLoadBalancerPrefix + "ip-version" // MAX_LOADBALANCER_BACKEND max default lb backend count. MAX_LOADBALANCER_BACKEND = 18 // ServiceAnnotationLoadBalancerPrivateZoneName private zone name ServiceAnnotationLoadBalancerPrivateZoneName = ServiceAnnotationPrivateZonePrefix + "name" // ServiceAnnotationLoadBalancerPrivateZoneId private zone id ServiceAnnotationLoadBalancerPrivateZoneId = ServiceAnnotationPrivateZonePrefix + "id" // ServiceAnnotationLoadBalancerPrivateZoneRecordName private zone record name ServiceAnnotationLoadBalancerPrivateZoneRecordName = ServiceAnnotationPrivateZonePrefix + "record-name" // ServiceAnnotationLoadBalancerPrivateZoneRecordTTL private zone record ttl ServiceAnnotationLoadBalancerPrivateZoneRecordTTL = ServiceAnnotationPrivateZonePrefix + "record-ttl" // ServiceAnnotationLoadBalancerBackendType backend type ServiceAnnotationLoadBalancerBackendType = utils.BACKEND_TYPE_LABEL )
const DEFAULT_LANG = "en"
DEFAULT_LANG default lang
const DEFAULT_SERVER_WEIGHT = 100
DEFAULT_SERVER_WEIGHT default server weight
const MAX_BACKEND_NUM = 19
MAX_BACKEND_NUM max batch backend num
const ProviderName = "alicloud"
ProviderName is the name of this cloud provider.
const TAGKEY = "kubernetes.do.not.delete"
TAGKEY Default tag key.
Variables ¶
var ( // DEFAULT_CHARGE_TYPE default charge type DEFAULT_CHARGE_TYPE = common.PayByTraffic // DEFAULT_BANDWIDTH default bandwidth DEFAULT_BANDWIDTH = 100 // DEFAULT_ADDRESS_TYPE default address type DEFAULT_ADDRESS_TYPE = slb.InternetAddressType DEFAULT_NODE_MONITOR_PERIOD = 120 * time.Second DEFAULT_NODE_ADDR_SYNC_PERIOD = 240 * time.Second // DEFAULT_REGION should be override in cloud initialize. DEFAULT_REGION = common.Hangzhou )
var ( INSTANCEID = "i-xlakjbidlslkcdxxxx" INSTANCEID2 = "i-xlakjbidlslkcdxxxx2" )
var ( LOADBALANCER_ID = "lb-bp1ids9hmq5924m6uk5w1" // do not change LOADBALANCER_NAME unless needed LOADBALANCER_NAME = "ac83f8bed812e11e9a0ad00163e0a398" LOADBALANCER_ADDRESS = "47.97.241.114" LOADBALANCER_NETWORK_TYPE = "classic" LOADBALANCER_SPEC = slb.LoadBalancerSpecType(slb.S1Small) SERVICE_UID = types.UID("2cb99d47-cc83-11e8-99db-00163e125603") )
var ( VPCID = "vpc-2zeaybwqmvn6qgabfd3pe" VROUTER_ID = "vrt-2zegcm0ty46mq243fmxoj" ROUTE_TABLE_ID = "vtb-2zedne8cr43rp5oqsr9xg" REGION = common.Hangzhou REGION_A = "cn-hangzhou-a" VSWITCH_ID = "vsw-2zeclpmxy66zzxj4cg4ls" ROUTE_ENTRIES = []ecs.RouteEntrySetType{ { RouteTableId: ROUTE_TABLE_ID, DestinationCidrBlock: "172.16.3.0/24", Type: ecs.RouteTableCustom, NextHopType: "Instance", InstanceId: "i-2zee0h6bdcgrocv2n9jb", Status: ecs.RouteEntryStatusAvailable, }, { RouteTableId: ROUTE_TABLE_ID, DestinationCidrBlock: "172.16.2.0/24", Type: ecs.RouteTableCustom, NextHopType: "Instance", InstanceId: "i-2zecarjjmtkx3oru4233", Status: ecs.RouteEntryStatusAvailable, }, { RouteTableId: ROUTE_TABLE_ID, DestinationCidrBlock: "172.16.0.0/24", Type: ecs.RouteTableCustom, NextHopType: "Instance", InstanceId: "i-2ze7q4vl8cosjsd56j0h", Status: ecs.RouteEntryStatusAvailable, }, { RouteTableId: ROUTE_TABLE_ID, DestinationCidrBlock: "0.0.0.0/0", Type: ecs.RouteTableCustom, NextHopType: "NatGateway", InstanceId: "ngw-2zetlvdtq0zt9ubez3zz3", Status: ecs.RouteEntryStatusAvailable, }, { RouteTableId: ROUTE_TABLE_ID, DestinationCidrBlock: "192.168.0.0/16", Type: ecs.RouteTableSystem, NextHopType: "local", Status: ecs.RouteEntryStatusAvailable, }, { RouteTableId: ROUTE_TABLE_ID, DestinationCidrBlock: "100.64.0.0/10", Type: ecs.RouteTableSystem, NextHopType: "service", Status: ecs.RouteEntryStatusAvailable, }, } )
var ( // ACTION_ADD actions add ACTION_ADD = "ADD" // ACTION_UPDATE update ACTION_UPDATE = "UPDATE" // ACTION_DELETE delete ACTION_DELETE = "DELETE" )
var ASSUME_ROLE_NAME = "AliyunCSManagedKubernetesRole"
ASSUME_ROLE_NAME managed kubernetes role name
var CLUSTER_ID = "clusterid"
CLUSTER_ID default cluster id if it is not specified.
var DEFAULT_LISTENER_BANDWIDTH = -1
DEFAULT_LISTENER_BANDWIDTH default listener bandwidth
var DEFAULT_PREFIX = "k8s"
DEFAULT_PREFIX default prefix for listener
var FORMAT_ERROR = "ListenerName Format Error: k8s/${port}/${service}/${namespace}/${clusterid} format is expected"
FORMAT_ERROR format error message
var INSTANCE = InstanceStore{}
var KUBERNETES_ALICLOUD_IDENTITY = fmt.Sprintf("Kubernetes.Alicloud/%s", version.Get().String())
KUBERNETES_ALICLOUD_IDENTITY is for statistic purpose.
var LOADBALANCER = LBStore{}
LOADBALANCER slb cloud mock storage string: *slb.LoadBalancerType{}
var ROLE_NAME = "KubernetesMasterRole"
ROLE_NAME default kubernetes master role name
var ROUTES = RouteStore{}
var STRINGS_EMPTY = ""
STRINGS_EMPTY empty string
var TOKEN_RESYNC_PERIOD = 10 * time.Minute
TOKEN_RESYNC_PERIOD default token sync period
Functions ¶
func BuildVirtualGroupFromRemoteAPI ¶
func BuildVirtualGroupFromRemoteAPI( lb *slb.LoadBalancerType, slbins *LoadBalancerClient, ) (vgroups, error)
func BuildVirturalGroupFromService ¶
func BuildVirturalGroupFromService( client *LoadBalancerClient, service *v1.Service, slbins *slb.LoadBalancerType, ) *vgroups
func CleanUPVGroupDirect ¶
func CleanUPVGroupDirect(local *vgroups) error
CleanUPVGroupDirect do clean vserver group
func CleanUPVGroupMerged ¶
func CleanUPVGroupMerged( slbins *LoadBalancerClient, service *v1.Service, lb *slb.LoadBalancerType, local *vgroups, ) error
CleanUPVGroupMerged Merge with service port and do clean vserver group
func DefaultPreset ¶
func DefaultPreset()
func EndpointIpsList ¶
func EnsureListeners ¶
func EnsureListeners( slbins *LoadBalancerClient, service *v1.Service, lb *slb.LoadBalancerType, vgs *vgroups, ) error
EnsureListeners make sure listeners reconciled 1. First, build listeners config from aliyun API output. 2. Second, build listeners from k8s service object. 3. Third, Merge the up two listeners to decide whether add/update/remove is needed. 4. Do update. Clean unused vserver group.
func EnsureListenersDeleted ¶
func EnsureListenersDeleted( client ClientSLBSDK, service *v1.Service, lb *slb.LoadBalancerType, vgs *vgroups, ) error
EnsureListenersDeleted Only listener which owned by my service was deleted.
func EnsureVirtualGroups ¶
func EnsureVirtualGroups(vgrps *vgroups, nodes interface{}) error
func ExpectExist ¶
func ExpectExistAndEqual ¶
service & Cloud data must be consistent
func ExpectNotExist ¶
func ExtractAnnotationRequest ¶
func ExtractAnnotationRequest(service *v1.Service) (*AnnotationRequest, *AnnotationRequest)
ExtractAnnotationRequest extract annotations from service labels defaulted is the parameters which set by programe. request represent user defined parameters.
func GetPrivateZoneRecordCache ¶
func GetPrivateZoneRecordCache() *kvstore
GetPrivateZoneRecordCache return record cache
func PreSetCloudData ¶
func PreSetCloudData(sets ...CloudDataMock)
func Protocol ¶
func Protocol(annotation string, port v1.ServicePort) (string, error)
Protocol for protocol transform
func RefreshToken ¶
func URIfromService ¶
URIfromService build ServiceURI from service
func WaitCreate ¶
func WaitCreate(rc *RoutesClient, tableid string, route *ecs.CreateRouteEntryArgs) error
WaitCreate create route and wait for route ready
func WaitDelete ¶
func WaitDelete(rc *RoutesClient, tableid string, route *ecs.DeleteRouteEntryArgs) error
WaitDelete delete route and wait for route ready
func WaitForRouteEntryAvailable ¶
WaitForRouteEntryAvailable wait for route entry available
Types ¶
type AkAuthToken ¶
type AkAuthToken struct {
// contains filtered or unexported fields
}
AkAuthToken implement ak auth
func (*AkAuthToken) NextToken ¶
func (f *AkAuthToken) NextToken() (*Token, error)
type AnnotationRequest ¶
type AnnotationRequest struct { Loadbalancerid string BackendLabel string BackendType string SSLPorts string AddressType slb.AddressType AclStatus string AclID string AclType string VswitchID string ForwardPort string SLBNetworkType string ChargeType slb.InternetChargeType //Region common.Region Bandwidth int CertID string MasterZoneID string SlaveZoneID string HealthCheck slb.FlagType HealthCheckURI string HealthCheckConnectPort int HealthyThreshold int UnhealthyThreshold int HealthCheckInterval int HealthCheckDomain string HealthCheckHttpCode slb.HealthCheckHttpCodeType HealthCheckConnectTimeout int // for tcp HealthCheckType slb.HealthCheckType // for tcp, Type could be http tcp HealthCheckTimeout int // for https and http LoadBalancerSpec slb.LoadBalancerSpecType Scheduler string StickySession slb.FlagType StickySessionType slb.StickySessionType Cookie string CookieTimeout int PersistenceTimeout int AddressIPVersion slb.AddressIPVersionType OverrideListeners string PrivateZoneName string PrivateZoneId string PrivateZoneRecordName string PrivateZoneRecordTTL int RemoveUnscheduledBackend string }
AnnotationRequest annotated parameters.
type ClientInstanceSDK ¶
type ClientInstanceSDK interface { AddTags(args *ecs.AddTagsArgs) error DescribeInstances(args *ecs.DescribeInstancesArgs) (instances []ecs.InstanceAttributesType, pagination *common.PaginationResult, err error) DescribeNetworkInterfaces(args *ecs.DescribeNetworkInterfacesArgs) (resp *ecs.DescribeNetworkInterfacesResponse, err error) }
ClientInstanceSDK instance sdk
type ClientMgr ¶
type ClientMgr struct {
// contains filtered or unexported fields
}
ClientMgr client manager for aliyun sdk
func NewClientMgr ¶
NewClientMgr return a new client manager
func (*ClientMgr) Instances ¶
func (mgr *ClientMgr) Instances() *InstanceClient
Instances return instance client
func (*ClientMgr) LoadBalancers ¶
func (mgr *ClientMgr) LoadBalancers() *LoadBalancerClient
LoadBalancers return loadbalancer client
func (*ClientMgr) PrivateZones ¶
func (mgr *ClientMgr) PrivateZones() *PrivateZoneClient
PrivateZones return PrivateZones client
type ClientPVTZSDK ¶
type ClientPVTZSDK interface { DescribeZones(args *pvtz.DescribeZonesArgs) (zones []pvtz.ZoneType, err error) AddZone(args *pvtz.AddZoneArgs) (response *pvtz.AddZoneResponse, err error) DeleteZone(args *pvtz.DeleteZoneArgs) (err error) CheckZoneName(args *pvtz.CheckZoneNameArgs) (bool, error) UpdateZoneRemark(args *pvtz.UpdateZoneRemarkArgs) error DescribeZoneInfo(args *pvtz.DescribeZoneInfoArgs) (response *pvtz.DescribeZoneInfoResponse, err error) BindZoneVpc(args *pvtz.BindZoneVpcArgs) (err error) DescribeRegions() (regions []pvtz.RegionType, err error) DescribeZoneRecords(args *pvtz.DescribeZoneRecordsArgs) (records []pvtz.ZoneRecordType, err error) DescribeZoneRecordsByRR(zoneId string, rr string) (records []pvtz.ZoneRecordType, err error) DeleteZoneRecordsByRR(zoneId string, rr string) error AddZoneRecord(args *pvtz.AddZoneRecordArgs) (response *pvtz.AddZoneRecordResponse, err error) UpdateZoneRecord(args *pvtz.UpdateZoneRecordArgs) (err error) DeleteZoneRecord(args *pvtz.DeleteZoneRecordArgs) (err error) SetZoneRecordStatus(args *pvtz.SetZoneRecordStatusArgs) (err error) }
ClientPVTZSDK private zone sdk interface
type ClientSLBSDK ¶
type ClientSLBSDK interface { DescribeLoadBalancers(args *slb.DescribeLoadBalancersArgs) (loadBalancers []slb.LoadBalancerType, err error) CreateLoadBalancer(args *slb.CreateLoadBalancerArgs) (response *slb.CreateLoadBalancerResponse, err error) DeleteLoadBalancer(loadBalancerId string) (err error) ModifyLoadBalancerInstanceSpec(args *slb.ModifyLoadBalancerInstanceSpecArgs) (err error) ModifyLoadBalancerInternetSpec(args *slb.ModifyLoadBalancerInternetSpecArgs) (err error) DescribeLoadBalancerAttribute(loadBalancerId string) (loadBalancer *slb.LoadBalancerType, err error) RemoveBackendServers(loadBalancerId string, backendServers []string) (result []slb.BackendServerType, err error) AddBackendServers(loadBalancerId string, backendServers []slb.BackendServerType) (result []slb.BackendServerType, err error) StopLoadBalancerListener(loadBalancerId string, port int) (err error) StartLoadBalancerListener(loadBalancerId string, port int) (err error) CreateLoadBalancerTCPListener(args *slb.CreateLoadBalancerTCPListenerArgs) (err error) CreateLoadBalancerUDPListener(args *slb.CreateLoadBalancerUDPListenerArgs) (err error) DeleteLoadBalancerListener(loadBalancerId string, port int) (err error) CreateLoadBalancerHTTPSListener(args *slb.CreateLoadBalancerHTTPSListenerArgs) (err error) CreateLoadBalancerHTTPListener(args *slb.CreateLoadBalancerHTTPListenerArgs) (err error) DescribeLoadBalancerHTTPSListenerAttribute(loadBalancerId string, port int) (response *slb.DescribeLoadBalancerHTTPSListenerAttributeResponse, err error) DescribeLoadBalancerTCPListenerAttribute(loadBalancerId string, port int) (response *slb.DescribeLoadBalancerTCPListenerAttributeResponse, err error) DescribeLoadBalancerUDPListenerAttribute(loadBalancerId string, port int) (response *slb.DescribeLoadBalancerUDPListenerAttributeResponse, err error) DescribeLoadBalancerHTTPListenerAttribute(loadBalancerId string, port int) (response *slb.DescribeLoadBalancerHTTPListenerAttributeResponse, err error) SetLoadBalancerHTTPListenerAttribute(args *slb.SetLoadBalancerHTTPListenerAttributeArgs) (err error) SetLoadBalancerHTTPSListenerAttribute(args *slb.SetLoadBalancerHTTPSListenerAttributeArgs) (err error) SetLoadBalancerTCPListenerAttribute(args *slb.SetLoadBalancerTCPListenerAttributeArgs) (err error) SetLoadBalancerUDPListenerAttribute(args *slb.SetLoadBalancerUDPListenerAttributeArgs) (err error) RemoveTags(args *slb.RemoveTagsArgs) error DescribeTags(args *slb.DescribeTagsArgs) (tags []slb.TagItemType, pagination *common.PaginationResult, err error) AddTags(args *slb.AddTagsArgs) error CreateVServerGroup(args *slb.CreateVServerGroupArgs) (response *slb.CreateVServerGroupResponse, err error) DescribeVServerGroups(args *slb.DescribeVServerGroupsArgs) (response *slb.DescribeVServerGroupsResponse, err error) DeleteVServerGroup(args *slb.DeleteVServerGroupArgs) (response *slb.DeleteVServerGroupResponse, err error) SetVServerGroupAttribute(args *slb.SetVServerGroupAttributeArgs) (response *slb.SetVServerGroupAttributeResponse, err error) DescribeVServerGroupAttribute(args *slb.DescribeVServerGroupAttributeArgs) (response *slb.DescribeVServerGroupAttributeResponse, err error) ModifyVServerGroupBackendServers(args *slb.ModifyVServerGroupBackendServersArgs) (response *slb.ModifyVServerGroupBackendServersResponse, err error) AddVServerGroupBackendServers(args *slb.AddVServerGroupBackendServersArgs) (response *slb.AddVServerGroupBackendServersResponse, err error) RemoveVServerGroupBackendServers(args *slb.RemoveVServerGroupBackendServersArgs) (response *slb.RemoveVServerGroupBackendServersResponse, err error) }
ClientSLBSDK client sdk for slb
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
cloud is an implementation of Interface, LoadBalancer and Instances for Alicloud Services.
func NewMockCloud ¶
func (*Cloud) AddSSHKeyToAllInstances ¶
AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances expected format for the key is standard ssh-keygen format: <protocol> <blob>
func (*Cloud) Clusters ¶
func (c *Cloud) Clusters() (cloudprovider.Clusters, bool)
Clusters returns the list of clusters.
func (*Cloud) CreateRoute ¶
func (c *Cloud) CreateRoute(clusterName string, nameHint string, tableid string, route *cloudprovider.Route) error
CreateRoute creates the described managed route route.Name will be ignored, although the cloud-provider may use nameHint to create a more user-meaningful name.
func (*Cloud) CurrentNodeName ¶
CurrentNodeName returns the name of the node we are currently running on On most clouds (e.g. GCE) this is the hostname, so we provide the hostname
func (*Cloud) DeleteRoute ¶
DeleteRoute deletes the specified managed route Route should be as returned by ListRoutes
func (*Cloud) EnsureLoadBalancer ¶
func (c *Cloud) EnsureLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer Implementations must treat the *v1.svc and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*Cloud) EnsureLoadBalancerDeleted ¶
EnsureLoadBalancerDeleted deletes the specified load balancer if it exists, returning nil if the load balancer specified either didn't exist or was successfully deleted. This construction is useful because many cloud providers' load balancers have multiple underlying components, meaning a Get could say that the LB doesn't exist even if some part of it is still laying around. Implementations must treat the *v1.svc parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*Cloud) EnsureLoadBalancerWithENI ¶
func (*Cloud) ExternalID ¶
ExternalID returns the cloud provider ID of the node with the specified NodeName. Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
func (*Cloud) GetLoadBalancer ¶
func (c *Cloud) GetLoadBalancer(clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
GetLoadBalancer returns whether the specified load balancer exists, and if so, what its status is. Implementations must treat the *v1.svc parameter as read-only and not modify it. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager TODO: Break this up into different interfaces (LB, etc) when we have more than one type of service
func (*Cloud) GetZone ¶
func (c *Cloud) GetZone() (cloudprovider.Zone, error)
GetZone returns the Zone containing the current failure zone and locality region that the program is running in
func (*Cloud) GetZoneByNodeName ¶
GetZoneByNodeName returns the Zone containing the current zone and locality region of the node specified by node name This method is particularly used in the context of external cloud providers where node initialization must be down outside the kubelets.
func (*Cloud) GetZoneByProviderID ¶
func (c *Cloud) GetZoneByProviderID(providerID string) (cloudprovider.Zone, error)
GetZoneByProviderID returns the Zone containing the current zone and locality region of the node specified by providerId This method is particularly used in the context of external cloud providers where node initialization must be down outside the kubelets.
func (*Cloud) HasClusterID ¶
HasClusterID returns true if a ClusterID is required and set
func (*Cloud) Initialize ¶
func (c *Cloud) Initialize(builder ctrlclient.ControllerClientBuilder)
Initialize passes a Kubernetes clientBuilder interface to the cloud provider
func (*Cloud) InstanceExistsByProviderID ¶
InstanceExistsByProviderID returns true if the instance for the given provider id still is running. If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
func (*Cloud) InstanceID ¶
InstanceID returns the cloud provider ID of the node with the specified NodeName.
func (*Cloud) InstanceType ¶
InstanceType returns the type of the specified instance.
func (*Cloud) InstanceTypeByProviderID ¶
InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here
func (*Cloud) Instances ¶
func (c *Cloud) Instances() (cloudprovider.Instances, bool)
Instances returns an implementation of Instances for Alicloud Services.
func (*Cloud) ListClusters ¶
ListClusters lists the names of the available clusters.
func (*Cloud) ListInstances ¶
func (*Cloud) ListRoutes ¶
ListRoutes lists all managed routes that belong to the specified clusterName
func (*Cloud) LoadBalancer ¶
func (c *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer returns an implementation of LoadBalancer for Alicloud Services.
func (*Cloud) Master ¶
Master gets back the address (either DNS name or IP address) of the master node for the cluster.
func (*Cloud) NodeAddresses ¶
NodeAddresses returns the addresses of the specified instance. TODO(roberthbailey): This currently is only used in such a way that it returns the address of the calling instance. We should do a rename to make this clearer.
func (*Cloud) NodeAddressesByProviderID ¶
func (c *Cloud) NodeAddressesByProviderID(providerID string) ([]v1.NodeAddress, error)
NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID This method will not be called from the node that is requesting this ID. i.e. metadata service and other local methods cannot be used here
func (*Cloud) ProviderName ¶
ProviderName returns the cloud provider ID.
func (*Cloud) RouteTables ¶
RouteTables return route table list
func (*Cloud) Routes ¶
func (c *Cloud) Routes() (cloudprovider.Routes, bool)
Routes returns an implementation of Routes for Alicloud Services.
func (*Cloud) SetInstanceTags ¶
func (*Cloud) UpdateLoadBalancer ¶
UpdateLoadBalancer updates hosts under the specified load balancer. Implementations must treat the *v1.svc and *v1.Node parameters as read-only and not modify them. Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
func (*Cloud) UpdateLoadBalancerWithENI ¶
type CloudConfig ¶
type CloudConfig struct { Global struct { KubernetesClusterTag string `json:"kubernetesClusterTag"` NodeMonitorPeriod int64 `json:"nodeMonitorPeriod"` NodeAddrSyncPeriod int64 `json:"nodeAddrSyncPeriod"` UID string `json:"uid"` Region string `json:"region"` ZoneID string `json:"zoneid"` VswitchID string `json:"vswitchid"` ClusterID string `json:"clusterID"` DisablePublicSLB bool `json:"disablePublicSLB"` AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` } }
CloudConfig wraps the settings for the Alicloud provider.
type CloudDataMock ¶
type CloudDataMock func()
CloudDataMock is a function which set mocked Cloud initial data, include alibaba route/slb/instance
func WithENI ¶
func WithENI() CloudDataMock
func WithInstance ¶
func WithInstance() CloudDataMock
func WithLoadBalancer ¶
func WithLoadBalancer() CloudDataMock
func WithNewInstanceStore ¶
func WithNewInstanceStore() CloudDataMock
func WithNewLoadBalancerStore ¶
func WithNewLoadBalancerStore() CloudDataMock
func WithNewRouteStore ¶
func WithNewRouteStore() CloudDataMock
func WithRouteTableEntrySet ¶
func WithRouteTableEntrySet() CloudDataMock
func WithVRouter ¶
func WithVRouter() CloudDataMock
func WithVpcs ¶
func WithVpcs() CloudDataMock
type FrameWork ¶
type FrameWork struct { Cloud *Cloud SVC *v1.Service Nodes []*v1.Node Endpoint *v1.Endpoints CloudDataMock func() }
func NewDefaultFrameWork ¶
func NewFrameWork ¶
func NewFrameWorkWithOptions ¶
func NewFrameWorkWithOptions( option OptionsFunc, ) *FrameWork
func (*FrameWork) Instance ¶
func (f *FrameWork) Instance() *InstanceClient
func (*FrameWork) InstanceSDK ¶
func (f *FrameWork) InstanceSDK() ClientInstanceSDK
func (*FrameWork) ListenerEqual ¶
func (*FrameWork) LoadBalancer ¶
func (f *FrameWork) LoadBalancer() *LoadBalancerClient
func (*FrameWork) PVTZSDK ¶
func (f *FrameWork) PVTZSDK() ClientPVTZSDK
func (*FrameWork) Route ¶
func (f *FrameWork) Route() *RoutesClient
func (*FrameWork) SLBSDK ¶
func (f *FrameWork) SLBSDK() ClientSLBSDK
func (*FrameWork) SLBSpecEqual ¶
func (f *FrameWork) SLBSpecEqual(mlb *slb.LoadBalancerType) error
type IMetaData ¶
type IMetaData interface { HostName() (string, error) ImageID() (string, error) InstanceID() (string, error) Mac() (string, error) NetworkType() (string, error) OwnerAccountID() (string, error) PrivateIPv4() (string, error) Region() (string, error) SerialNumber() (string, error) SourceAddress() (string, error) VpcCIDRBlock() (string, error) VpcID() (string, error) VswitchCIDRBlock() (string, error) Zone() (string, error) NTPConfigServers() ([]string, error) RoleName() (string, error) RamRoleToken(role string) (metadata.RoleAuth, error) VswitchID() (string, error) }
IMetaData metadata interface
type InstanceClient ¶
type InstanceClient struct { CurrentNodeName types.NodeName // contains filtered or unexported fields }
InstanceClient wrap for instance sdk
func (*InstanceClient) AddCloudTags ¶
func (*InstanceClient) ListInstances ¶
func (s *InstanceClient) ListInstances(ids []string) (map[string]*node.CloudNodeAttribute, error)
type InstanceStore ¶
type InstanceStore struct {
// contains filtered or unexported fields
}
type Listener ¶
type Listener struct { Name string // NamedKey Map between ServiceName and Listener from console view. NamedKey *NamedKey // Proto is the protocol from console view Proto string // TransforedProto is the real protocol that a listener indicated. TransforedProto string Port int32 // NodePort Backend server port NodePort int32 // ServiceName reference from k8s service Service *v1.Service // LoadBalancerID service connected SLB. LoadBalancerID string // Action indicate the operate method. ADD UPDATE DELETE Action string Client ClientSLBSDK VGroups *vgroups }
Listener loadbalancer listener
type Listeners ¶
type Listeners []*Listener
Listeners listeners collection
func BuildActionsForListeners ¶
1. We update listener to the latest version2 when updation is needed. 2. We assume listener with an empty name to be legacy version. 3. We assume listener with an arbitrary name to be user managed listener. 4. LoadBalancer created by kubernetes is not allowed to be reused.
func BuildListenersFromAPI ¶
func BuildListenersFromAPI( service *v1.Service, lb *slb.LoadBalancerType, client ClientSLBSDK, vgrps *vgroups, ) (listeners Listeners)
BuildListenersFromAPI Load current listeners
func BuildListenersFromService ¶
func BuildListenersFromService( svc *v1.Service, lb *slb.LoadBalancerType, client ClientSLBSDK, vgrps *vgroups, ) (Listeners, error)
BuildListenersFromService Build expected listeners
type LoadBalancerClient ¶
type LoadBalancerClient struct {
// contains filtered or unexported fields
}
LoadBalancerClient slb client wrapper
func (*LoadBalancerClient) EnsureLoadBalanceDeleted ¶
func (s *LoadBalancerClient) EnsureLoadBalanceDeleted(service *v1.Service) error
EnsureLoadBalanceDeleted make sure slb is deleted
func (*LoadBalancerClient) EnsureLoadBalancer ¶
func (s *LoadBalancerClient) EnsureLoadBalancer(service *v1.Service, nodes interface{}, vswitchid string) (*slb.LoadBalancerType, error)
EnsureLoadBalancer make sure slb is reconciled nodes []*v1.Node
func (*LoadBalancerClient) UpdateDefaultServerGroup ¶
func (s *LoadBalancerClient) UpdateDefaultServerGroup(backends interface{}, lb *slb.LoadBalancerType) error
UpdateDefaultServerGroup update default server group
func (*LoadBalancerClient) UpdateLoadBalancer ¶
func (s *LoadBalancerClient) UpdateLoadBalancer(service *v1.Service, nodes interface{}, withVgroup bool) error
UpdateLoadBalancer make sure slb backend is reconciled
type NamedKey ¶
NamedKey identify listeners on grouped attributes
func LoadNamedKey ¶
LoadNamedKey build NamedKey from string.
func (*NamedKey) ServiceURI ¶
ServiceURI service URI for the NamedKey.
type OptionsFunc ¶
type OptionsFunc func(f *FrameWork)
type PrivateZoneClient ¶
type PrivateZoneClient struct {
// contains filtered or unexported fields
}
PrivateZoneClient private zone client wrapper
func (*PrivateZoneClient) EnsurePrivateZoneRecord ¶
func (s *PrivateZoneClient) EnsurePrivateZoneRecord(service *v1.Service, ip string, ipVersion slb.AddressIPVersionType) (zone *pvtz.DescribeZoneInfoResponse, record *pvtz.ZoneRecordType, err error)
EnsurePrivateZoneRecord make sure private zone record is reconciled
func (*PrivateZoneClient) EnsurePrivateZoneRecordDeleted ¶
func (s *PrivateZoneClient) EnsurePrivateZoneRecordDeleted(service *v1.Service, ip string, ipVersion slb.AddressIPVersionType) error
EnsurePrivateZoneRecordDeleted make sure private zone record is deleted.
type RamRoleToken ¶
type RamRoleToken struct {
// contains filtered or unexported fields
}
func (*RamRoleToken) NextToken ¶
func (f *RamRoleToken) NextToken() (*Token, error)
type RouteSDK ¶
type RouteSDK interface { DescribeVpcs(args *ecs.DescribeVpcsArgs) (vpcs []ecs.VpcSetType, pagination *common.PaginationResult, err error) DescribeVRouters(args *ecs.DescribeVRoutersArgs) (vrouters []ecs.VRouterSetType, pagination *common.PaginationResult, err error) DescribeRouteTables(args *ecs.DescribeRouteTablesArgs) (routeTables []ecs.RouteTableSetType, pagination *common.PaginationResult, err error) DeleteRouteEntry(args *ecs.DeleteRouteEntryArgs) error CreateRouteEntry(args *ecs.CreateRouteEntryArgs) error WaitForAllRouteEntriesAvailable(vrouterId string, routeTableId string, timeout int) error }
RouteSDK define route sdk interface
type RouteStore ¶
type RouteStore struct {
// contains filtered or unexported fields
}
type RoutesClient ¶
type RoutesClient struct {
// contains filtered or unexported fields
}
RoutesClient wrap route sdk
func (*RoutesClient) CreateRoute ¶
func (r *RoutesClient) CreateRoute(tabid string, route *cloudprovider.Route, region common.Region, vpcid string) error
CreateRoute creates the described managed route route.Name will be ignored, although the cloud-provider may use nameHint to create a more user-meaningful name.
func (*RoutesClient) DeleteRoute ¶
func (r *RoutesClient) DeleteRoute(tabid string, route *cloudprovider.Route, region common.Region) error
DeleteRoute deletes the specified managed route Route should be as returned by ListRoutes
func (*RoutesClient) ListRoutes ¶
func (r *RoutesClient) ListRoutes(tableid string) ([]*cloudprovider.Route, error)
ListRoutes lists all managed routes that belong to the specified clusterName
func (*RoutesClient) RouteTables ¶
func (r *RoutesClient) RouteTables() ([]string, error)
RouteTables return all the tables in the vpc network.
type ServiceToken ¶
type ServiceToken struct {
// contains filtered or unexported fields
}
ServiceToken is an implemention of service account auth
func (*ServiceToken) NextToken ¶
func (f *ServiceToken) NextToken() (*Token, error)