resources

package
v0.0.0-...-7a4df5e Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeAutoscalingLaunchConfig = "autoscaling-config"
	TypeNatGateway              = "nat-gateway"
	TypeElasticIp               = "elastic-ip"
	TypeLoadBalancer            = "load-balancer"
)

Variables

This section is empty.

Functions

func BuildEC2Filters

func BuildEC2Filters(cloud fi.Cloud) []*ec2.Filter

func DeleteAutoScalingGroup

func DeleteAutoScalingGroup(cloud fi.Cloud, r *Resource) error

func DeleteAutoscalingLaunchConfiguration

func DeleteAutoscalingLaunchConfiguration(cloud fi.Cloud, r *Resource) error

func DeleteCloudFormationStack

func DeleteCloudFormationStack(cloud fi.Cloud, t *Resource) error

func DeleteDhcpOptions

func DeleteDhcpOptions(cloud fi.Cloud, r *Resource) error

func DeleteELB

func DeleteELB(cloud fi.Cloud, r *Resource) error

func DeleteElasticIP

func DeleteElasticIP(cloud fi.Cloud, t *Resource) error

func DeleteIAMInstanceProfile

func DeleteIAMInstanceProfile(cloud fi.Cloud, r *Resource) error

func DeleteIAMRole

func DeleteIAMRole(cloud fi.Cloud, r *Resource) error

func DeleteInstance

func DeleteInstance(cloud fi.Cloud, t *Resource) error

func DeleteInternetGateway

func DeleteInternetGateway(cloud fi.Cloud, r *Resource) error

func DeleteKeypair

func DeleteKeypair(cloud fi.Cloud, r *Resource) error

func DeleteNatGateway

func DeleteNatGateway(cloud fi.Cloud, t *Resource) error

func DeleteRouteTable

func DeleteRouteTable(cloud fi.Cloud, r *Resource) error

func DeleteSecurityGroup

func DeleteSecurityGroup(cloud fi.Cloud, t *Resource) error

func DeleteSubnet

func DeleteSubnet(cloud fi.Cloud, tracker *Resource) error

func DeleteVPC

func DeleteVPC(cloud fi.Cloud, r *Resource) error

func DeleteVolume

func DeleteVolume(cloud fi.Cloud, r *Resource) error

func DescribeDhcpOptions

func DescribeDhcpOptions(cloud fi.Cloud) ([]*ec2.DhcpOptions, error)

func DescribeELBs

func DescribeELBs(cloud fi.Cloud) ([]*elb.LoadBalancerDescription, map[string][]*elb.Tag, error)

func DescribeInternetGateways

func DescribeInternetGateways(cloud fi.Cloud) ([]*ec2.InternetGateway, error)

func DescribeInternetGatewaysIgnoreTags

func DescribeInternetGatewaysIgnoreTags(cloud fi.Cloud) ([]*ec2.InternetGateway, error)

DescribeInternetGatewaysIgnoreTags returns all ec2.InternetGateways, ignoring tags (gateways were not always tagged in kube-up)

func DescribeRouteTables

func DescribeRouteTables(cloud fi.Cloud) ([]*ec2.RouteTable, error)

DescribeRouteTables lists route-tables tagged for the cloud

func DescribeRouteTablesIgnoreTags

func DescribeRouteTablesIgnoreTags(cloud fi.Cloud) ([]*ec2.RouteTable, error)

DescribeRouteTablesIgnoreTags returns all ec2.RouteTable, ignoring tags

func DescribeSecurityGroups

func DescribeSecurityGroups(cloud fi.Cloud) ([]*ec2.SecurityGroup, error)

func DescribeSubnets

func DescribeSubnets(cloud fi.Cloud) ([]*ec2.Subnet, error)

func DescribeVPCs

func DescribeVPCs(cloud fi.Cloud) ([]*ec2.Vpc, error)

func DescribeVolumes

func DescribeVolumes(cloud fi.Cloud) ([]*ec2.Volume, error)

func DumpCloudFormationStack

func DumpCloudFormationStack(op *DumpOperation, r *Resource) error

func DumpELB

func DumpELB(op *DumpOperation, r *Resource) error

func DumpInstance

func DumpInstance(op *DumpOperation, r *Resource) error

func DumpSecurityGroup

func DumpSecurityGroup(op *DumpOperation, r *Resource) error

func DumpVMInfo

func DumpVMInfo(op *DumpOperation, r *Resource) error

func DumpVPC

func DumpVPC(op *DumpOperation, r *Resource) error

func FindASGName

func FindASGName(tags []*autoscaling.TagDescription) string

func FindAutoscalingLaunchConfiguration

func FindAutoscalingLaunchConfiguration(cloud awsup.AWSCloud, name string) (*autoscaling.LaunchConfiguration, error)

FindAutoscalingLaunchConfiguration finds an AWS launch configuration given its name

func FindELBName

func FindELBName(tags []*elb.Tag) string

func FindName

func FindName(tags []*ec2.Tag) string

func GetResourceTrackerKey

func GetResourceTrackerKey(t *Resource) string

func HasSharedTag

func HasSharedTag(description string, tags []*ec2.Tag, clusterName string) bool

HasSharedTag looks for the shared tag indicating that the cluster does not own the resource

func IsDependencyViolation

func IsDependencyViolation(err error) bool

func ListResourcesAWS

func ListResourcesAWS(cloud awsup.AWSCloud, clusterName string) (map[string]*Resource, error)

func ListResourcesVSphere

func ListResourcesVSphere(cloud *vsphere.VSphereCloud, clusterName string) (map[string]*Resource, error)

Types

type Dump

type Dump struct {
	Resources []interface{} `json:"resources,omitempty"`
	Instances []*Instance   `json:"instances,omitempty"`
}

Dump is the type for a dump result

func BuildDump

func BuildDump(ctx context.Context, cloud fi.Cloud, resources map[string]*Resource) (*Dump, error)

BuildDump gathers information about the cluster and returns an object for dumping

type DumpOperation

type DumpOperation struct {
	// Context is the golang context.Context for the dump operation
	Context context.Context

	// Cloud is the cloud we are dumping
	Cloud fi.Cloud

	// CloudState allows the cloudprovider to store state during the dump operation
	CloudState interface{}

	// Dump is the target of our dump
	Dump *Dump
}

DumpOperation holds context information for a dump, allowing for extension

type Instance

type Instance struct {
	Name            string   `json:"name,omitempty"`
	PublicAddresses []string `json:"publicAddresses,omitempty"`
}

Instance is the type for an instance in a dump

type Resource

type Resource struct {
	Name string
	Type string
	ID   string

	// If true, this resource is not owned by the cluster
	Shared bool

	Blocks  []string
	Blocked []string
	Done    bool

	Deleter      func(cloud fi.Cloud, tracker *Resource) error
	GroupKey     string
	GroupDeleter func(cloud fi.Cloud, trackers []*Resource) error

	// Dumper populates the dump with any information from the resource
	Dumper func(op *DumpOperation, r *Resource) error

	Obj interface{}
}

func FindAutoScalingLaunchConfigurations

func FindAutoScalingLaunchConfigurations(cloud fi.Cloud, securityGroups sets.String) ([]*Resource, error)

func FindNatGateways

func FindNatGateways(cloud fi.Cloud, routeTables map[string]*Resource) ([]*Resource, error)

func ListAutoScalingGroups

func ListAutoScalingGroups(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListCloudFormationStacks

func ListCloudFormationStacks(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListDhcpOptions

func ListDhcpOptions(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListELBs

func ListELBs(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListIAMInstanceProfiles

func ListIAMInstanceProfiles(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListIAMRoles

func ListIAMRoles(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListInstances

func ListInstances(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListInternetGateways

func ListInternetGateways(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListKeypairs

func ListKeypairs(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListRoute53Records

func ListRoute53Records(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListRouteTables

func ListRouteTables(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListSecurityGroups

func ListSecurityGroups(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListSubnets

func ListSubnets(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListVPCs

func ListVPCs(cloud fi.Cloud, clusterName string) ([]*Resource, error)

func ListVolumes

func ListVolumes(cloud fi.Cloud, clusterName string) ([]*Resource, error)

Directories

Path Synopsis
dns

Jump to

Keyboard shortcuts

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