digitalocean

package
v1.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 19 Imported by: 129

Documentation

Index

Constants

View Source
const TagKubernetesClusterIndex = "k8s-index"
View Source
const TagKubernetesClusterNamePrefix = "KubernetesCluster"
View Source
const TagKubernetesInstanceGroup = "kops-instancegroup"

Variables

This section is empty.

Functions

func ListResources

func ListResources(cloud *Cloud, clusterName string) (map[string]*resources.Resource, error)

Types

type Cloud

type Cloud struct {
	Client *godo.Client

	// RegionName holds the region, renamed to avoid conflict with Region()
	RegionName string
	// contains filtered or unexported fields
}

Cloud exposes all the interfaces required to operate on DigitalOcean resources

func NewCloud

func NewCloud(region string) (*Cloud, error)

NewCloud returns a Cloud, expecting the env var DIGITALOCEAN_ACCESS_TOKEN NewCloud will return an err if DIGITALOCEAN_ACCESS_TOKEN is not defined

func (*Cloud) DNS

func (c *Cloud) DNS() (dnsprovider.Interface, error)

DNS returns a DO implementation for dnsprovider.Interface

func (*Cloud) DeleteGroup

func (c *Cloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error

DeleteGroup is not implemented yet, is a func that needs to delete a DO instance group.

func (*Cloud) DeleteInstance

func (c *Cloud) DeleteInstance(i *cloudinstances.CloudInstance) error

func (*Cloud) DetachInstance added in v1.18.0

func (c *Cloud) DetachInstance(i *cloudinstances.CloudInstance) error

DetachInstance is not implemented yet. It needs to cause a cloud instance to no longer be counted against the group's size limits.

func (*Cloud) DropletActions added in v1.19.0

func (c *Cloud) DropletActions() godo.DropletActionsService

func (*Cloud) Droplets

func (c *Cloud) Droplets() godo.DropletsService

func (*Cloud) FindClusterStatus added in v1.17.0

func (c *Cloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)

FindClusterStatus discovers the status of the cluster, by looking for the tagged etcd volumes

func (*Cloud) FindVPCInfo

func (c *Cloud) FindVPCInfo(id string) (*fi.VPCInfo, error)

FindVPCInfo is not implemented, it's only here to satisfy the fi.Cloud interface

func (*Cloud) GetAllLoadBalancers added in v1.17.0

func (c *Cloud) GetAllLoadBalancers() ([]godo.LoadBalancer, error)

func (*Cloud) GetApiIngressStatus added in v1.17.0

func (c *Cloud) GetApiIngressStatus(cluster *kops.Cluster) ([]kops.ApiIngressStatus, error)

func (*Cloud) GetCloudGroups

func (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error)

func (*Cloud) LoadBalancers added in v1.17.0

func (c *Cloud) LoadBalancers() godo.LoadBalancersService

func (*Cloud) ProviderID

func (c *Cloud) ProviderID() kops.CloudProviderID

ProviderID returns the kops api identifier for DigitalOcean cloud provider

func (*Cloud) Region

func (c *Cloud) Region() string

Region returns the DO region we will target

func (*Cloud) VolumeActions

func (c *Cloud) VolumeActions() godo.StorageActionsService

VolumeActions returns an implementation of godo.StorageActionsService

func (*Cloud) Volumes

func (c *Cloud) Volumes() godo.StorageService

Volumes returns an implementation of godo.StorageService

type DOInstanceGroup added in v1.19.0

type DOInstanceGroup struct {
	ClusterName       string
	InstanceGroupName string
	GroupType         string   // will be either "master" or "worker"
	Members           []string // will store the droplet names that matches.
}

func FindInstanceGroups added in v1.19.0

func FindInstanceGroups(c *Cloud, clusterName string) ([]DOInstanceGroup, error)

FindInstanceGroups finds instance groups matching the specified tags

type TokenSource

type TokenSource struct {
	AccessToken string
}

TokenSource implements oauth2.TokenSource

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Token() returns oauth2.Token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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