Documentation ¶
Index ¶
- func GetRegion(zoneName string) (string, error)
- func MapNodeNameToInstanceName(nodeName types.NodeName) string
- func ParseProviderID(providerID string) (instanceName string, instanceNameIsId bool, err error)
- type Cloud
- func (yc *Cloud) AddSSHKeyToAllInstances(_ context.Context, _ string, _ []byte) error
- func (yc *Cloud) Clusters() (cloudprovider.Clusters, bool)
- func (yc *Cloud) CreateRoute(ctx context.Context, _ string, _ string, route *cloudprovider.Route) error
- func (yc *Cloud) CurrentNodeName(_ context.Context, hostName string) (types.NodeName, error)
- func (yc *Cloud) DeleteRoute(ctx context.Context, _ string, route *cloudprovider.Route) error
- func (yc *Cloud) EnsureLoadBalancer(ctx context.Context, _ string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
- func (yc *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, _ string, service *v1.Service) error
- func (yc *Cloud) GetLoadBalancer(ctx context.Context, _ string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
- func (yc *Cloud) GetLoadBalancerName(_ context.Context, _ string, service *v1.Service) string
- func (yc *Cloud) GetZone(_ context.Context) (cloudprovider.Zone, error)
- func (yc *Cloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
- func (yc *Cloud) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
- func (yc *Cloud) HasClusterID() bool
- func (yc *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
- func (yc *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error)
- func (yc *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string, error)
- func (yc *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error)
- func (yc *Cloud) InstanceType(_ context.Context, _ types.NodeName) (string, error)
- func (yc *Cloud) InstanceTypeByProviderID(_ context.Context, _ string) (string, error)
- func (yc *Cloud) Instances() (cloudprovider.Instances, bool)
- func (yc *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (yc *Cloud) ListRoutes(ctx context.Context, _ string) ([]*cloudprovider.Route, error)
- func (yc *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (yc *Cloud) NodeAddresses(ctx context.Context, nodeName types.NodeName) ([]v1.NodeAddress, error)
- func (yc *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error)
- func (yc *Cloud) ProviderName() string
- func (yc *Cloud) Routes() (cloudprovider.Routes, bool)
- func (yc *Cloud) UpdateLoadBalancer(ctx context.Context, _ string, service *v1.Service, nodes []*v1.Node) error
- func (yc *Cloud) Zones() (cloudprovider.Zones, bool)
- type CloudConfig
- type MetadataService
- type NodeTargetGroupSyncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
Cloud is an implementation of cloudprovider.Interface for Yandex.Cloud
func NewCloud ¶
func NewCloud(config CloudConfig, api *yapi.YandexCloudAPI) *Cloud
NewCloud creates a new instance of Cloud object
func (*Cloud) AddSSHKeyToAllInstances ¶
func (*Cloud) Clusters ¶
func (yc *Cloud) Clusters() (cloudprovider.Clusters, bool)
Clusters returns a clusters interface if supported.
func (*Cloud) CreateRoute ¶ added in v0.21.2
func (*Cloud) CurrentNodeName ¶
func (*Cloud) DeleteRoute ¶ added in v0.21.2
func (*Cloud) EnsureLoadBalancer ¶ added in v0.21.2
func (yc *Cloud) EnsureLoadBalancer(ctx context.Context, _ string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
EnsureLoadBalancer is an implementation of LoadBalancer.EnsureLoadBalancer.
func (*Cloud) EnsureLoadBalancerDeleted ¶ added in v0.21.2
func (yc *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, _ string, service *v1.Service) error
EnsureLoadBalancerDeleted is an implementation of LoadBalancer.EnsureLoadBalancerDeleted.
func (*Cloud) GetLoadBalancer ¶ added in v0.21.2
func (yc *Cloud) GetLoadBalancer(ctx context.Context, _ string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
GetLoadBalancer is an implementation of LoadBalancer.GetLoadBalancer
func (*Cloud) GetLoadBalancerName ¶ added in v0.21.2
GetLoadBalancerName is an implementation of LoadBalancer.GetLoadBalancerName.
func (*Cloud) GetZoneByNodeName ¶
func (*Cloud) GetZoneByProviderID ¶
func (*Cloud) HasClusterID ¶
HasClusterID returns true if the cluster has a clusterID
func (*Cloud) Initialize ¶
func (yc *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
Initialize passes a Kubernetes clientBuilder interface to the cloud provider
func (*Cloud) InstanceExistsByProviderID ¶
func (*Cloud) InstanceID ¶
func (*Cloud) InstanceShutdownByProviderID ¶
func (*Cloud) InstanceType ¶
func (*Cloud) InstanceTypeByProviderID ¶
func (*Cloud) Instances ¶
func (yc *Cloud) Instances() (cloudprovider.Instances, bool)
Instances returns an instances interface if supported.
func (*Cloud) InstancesV2 ¶ added in v0.21.2
func (yc *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool)
InstancesV2 returns a InstancesV2 interface if supported TODO (zuzzas): implement once it's stable enough (starting in v0.20.0)
func (*Cloud) ListRoutes ¶ added in v0.21.2
func (*Cloud) LoadBalancer ¶
func (yc *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer returns a balancer interface if supported.
func (*Cloud) NodeAddresses ¶
func (*Cloud) NodeAddressesByProviderID ¶
func (*Cloud) ProviderName ¶
ProviderName returns the cloud provider ID.
func (*Cloud) Routes ¶
func (yc *Cloud) Routes() (cloudprovider.Routes, bool)
Routes returns a routes interface if supported
type CloudConfig ¶
type CloudConfig struct { ClusterName string FolderID string LocalRegion string LocalZone string RouteTableID string InternalNetworkIDsSet map[string]struct{} ExternalNetworkIDsSet map[string]struct{} Credentials ycsdk.Credentials // contains filtered or unexported fields }
CloudConfig includes all the necessary configuration for creating Cloud object
func NewCloudConfig ¶
func NewCloudConfig() (*CloudConfig, error)
NewCloudConfig creates a new instance of CloudConfig object
type MetadataService ¶
type MetadataService struct {
// contains filtered or unexported fields
}
MetadataService knows how to query the Yandex.Cloud instance metadata server. See https://cloud.yandex.com/docs/compute/operations/vm-info/get-info#gce-metadata.
func NewMetadataService ¶
func NewMetadataService() *MetadataService
NewMetadataService creates an instance of the MetadataService object using default metadata URL.
func NewMetadataServiceWithURL ¶
func NewMetadataServiceWithURL(metadataURL string) *MetadataService
NewMetadataServiceWithURL creates an instance of the MetadataService object using specified metadata URL.
func (*MetadataService) Get ¶
func (m *MetadataService) Get(suffix string) (string, error)
Get returns a value from the instance metadata service. The suffix is appended to "${metadataURL}/computeMetadata/v1/".
func (*MetadataService) GetFolderID ¶
func (m *MetadataService) GetFolderID() (string, error)
GetFolderID returns the current VM's FolderID, such as "b1g4c2a3g6vkffp3qacq" Currently instance metadata service does not implement "project/project-id" element, so we using "instance/zone" to extract FolderID information
func (*MetadataService) GetZone ¶
func (m *MetadataService) GetZone() (string, error)
GetZone returns the current VM's Zone, such as "ru-central1-a".
type NodeTargetGroupSyncer ¶ added in v0.21.2
type NodeTargetGroupSyncer struct {
// contains filtered or unexported fields
}