Documentation ¶
Index ¶
- Constants
- func ListResources(cloud *Cloud, clusterName string) (map[string]*resources.Resource, error)
- type Cloud
- func (c *Cloud) DNS() (dnsprovider.Interface, error)
- func (c *Cloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
- func (c *Cloud) DeleteInstance(i *cloudinstances.CloudInstance) error
- func (c *Cloud) DetachInstance(i *cloudinstances.CloudInstance) error
- func (c *Cloud) DropletActions() godo.DropletActionsService
- func (c *Cloud) Droplets() godo.DropletsService
- func (c *Cloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)
- func (c *Cloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
- func (c *Cloud) GetAllLoadBalancers() ([]godo.LoadBalancer, error)
- func (c *Cloud) GetApiIngressStatus(cluster *kops.Cluster) ([]kops.ApiIngressStatus, error)
- func (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, ...) (map[string]*cloudinstances.CloudInstanceGroup, error)
- func (c *Cloud) LoadBalancers() godo.LoadBalancersService
- func (c *Cloud) ProviderID() kops.CloudProviderID
- func (c *Cloud) Region() string
- func (c *Cloud) VolumeActions() godo.StorageActionsService
- func (c *Cloud) Volumes() godo.StorageService
- type DOInstanceGroup
- type TokenSource
Constants ¶
const TagKubernetesClusterIndex = "k8s-index"
const TagKubernetesClusterNamePrefix = "KubernetesCluster"
const TagKubernetesInstanceGroup = "kops-instancegroup"
Variables ¶
This section is empty.
Functions ¶
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 ¶
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
FindClusterStatus discovers the status of the cluster, by looking for the tagged etcd volumes
func (*Cloud) FindVPCInfo ¶
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 (*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) 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