aws

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const AWSRegionsJSON = `` /* 789-byte string literal not displayed */
View Source
const ProviderName = "aws"

Variables

View Source
var AWSAnnotationPrefix = "aws." + cluster.AnnotationPrefix

Used in k8s annotations and labels

View Source
var AWSRegions map[string]AWSRegion
View Source
var ErrorNotFound = fmt.Errorf("Instance is not found")
View Source
var NameKey = AWSAnnotationPrefix + "name"

Node name as a tag on aws instance

Functions

This section is empty.

Types

type AWSNetwork

type AWSNetwork struct {
	VPC             string `k8s:"vpc-id"`
	InternetGateway string `k8s:"internet-gateway-id"`
	Subnet          string `k8s:"subnet-id"`
	RouteTable      string `k8s:"route-table-id"`
	Labels          map[string]string
	Annotations     map[string]string
}

type AWSNetworkOption

type AWSNetworkOption struct {
	NameServers string `k8s:"name-servers"`
	DomainName  string `k8s:"domain-name"`
}

type AWSRegion

type AWSRegion struct {
	PV  string `json:"pv"`
	HVM string `json:"hvm"`
}

type CloudConfig

type CloudConfig struct {
	Global struct {
		// TODO: Is there any use for this?  We can get it from the instance metadata service
		// Maybe if we're not running on AWS, e.g. bootstrap; for now it is not very useful
		Zone string

		KubernetesClusterTag string

		//The aws provider creates an inbound rule per load balancer on the node security
		//group. However, this can run into the AWS security group rule limit of 50 if
		//many LoadBalancers are created.
		//
		//This flag disables the automatic ingress creation. It requires that the user
		//has setup a rule that allows inbound traffic on kubelet ports from the
		//local VPC subnet (so load balancers can access it). E.g. 10.82.0.0/16 30000-32000.
		DisableSecurityGroupIngress bool

		//During the instantiation of an new AWS cloud provider, the detected region
		//is validated against a known set of regions.
		//
		//In a non-standard, AWS like environment (e.g. Eucalyptus), this check may
		//be undesirable.  Setting this to true will disable the check and provide
		//a warning that the check was skipped.  Please note that this is an
		//experimental feature and work-in-progress for the moment.  If you find
		//yourself in an non-AWS cloud and open an issue, please indicate that in the
		//issue body.
		DisableStrictZoneCheck bool
	}
}

type EC2

type EC2 interface {
	DescribeImages(input *ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)
	RunInstances(input *ec2.RunInstancesInput) (*ec2.Reservation, error)
	WaitUntilInstanceTerminated(input *ec2.DescribeInstancesInput) error
	ModifyInstanceAttribute(input *ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error)
	DescribeInstances(request *ec2.DescribeInstancesInput) ([]*ec2.Instance, error)
	TerminateInstances(input *ec2.TerminateInstancesInput) (*ec2.TerminateInstancesOutput, error)

	CreateVpc(input *ec2.CreateVpcInput) (*ec2.CreateVpcOutput, error)
	ModifyVpcAttribute(input *ec2.ModifyVpcAttributeInput) (*ec2.ModifyVpcAttributeOutput, error)
	DescribeSecurityGroups(input *ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
	AuthorizeSecurityGroupIngress(input *ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
	CreateInternetGateway(input *ec2.CreateInternetGatewayInput) (*ec2.CreateInternetGatewayOutput, error)
	AttachInternetGateway(input *ec2.AttachInternetGatewayInput) (*ec2.AttachInternetGatewayOutput, error)
	DescribeRouteTables(input *ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error)
	CreateRoute(input *ec2.CreateRouteInput) (*ec2.CreateRouteOutput, error)
	CreateSubnet(input *ec2.CreateSubnetInput) (*ec2.CreateSubnetOutput, error)
	ModifySubnetAttribute(input *ec2.ModifySubnetAttributeInput) (*ec2.ModifySubnetAttributeOutput, error)
	DeleteVpc(input *ec2.DeleteVpcInput) (*ec2.DeleteVpcOutput, error)
	DeleteInternetGateway(input *ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error)
	DetachInternetGateway(input *ec2.DetachInternetGatewayInput) (*ec2.DetachInternetGatewayOutput, error)
	DeleteSubnet(input *ec2.DeleteSubnetInput) (*ec2.DeleteSubnetOutput, error)
	CreateDhcpOptions(input *ec2.CreateDhcpOptionsInput) (*ec2.CreateDhcpOptionsOutput, error)
	AssociateDhcpOptions(input *ec2.AssociateDhcpOptionsInput) (*ec2.AssociateDhcpOptionsOutput, error)

	CreateNetworkInterface(input *ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)
	DeleteNetworkInterface(input *ec2.DeleteNetworkInterfaceInput) (*ec2.DeleteNetworkInterfaceOutput, error)
	AssociateAddress(input *ec2.AssociateAddressInput) (*ec2.AssociateAddressOutput, error)
	AllocateAddress(input *ec2.AllocateAddressInput) (*ec2.AllocateAddressOutput, error)
	ReleaseAddress(input *ec2.ReleaseAddressInput) (*ec2.ReleaseAddressOutput, error)

	CreateTags(input *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)
}

type EC2Metadata

type EC2Metadata interface {
	// Query the EC2 metadata service (used to discover instance-id etc)
	GetMetadata(path string) (string, error)
}

type EIP

type EIP struct {
	AllocationID string `k8s:"eip-allocation-id"`
}

type IAM

type IAM interface {
	GetInstanceProfile(input *iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error)
}

type InstanceOptions

type InstanceOptions struct {
	// AWS use instance profile to grant permissions to ec2 instances.
	InstanceProfile string `k8s:"instance-profile"`
	CloudInitS3Path string `k8s:"cloud-init-s3-path"`
}

type PrivateIP

type PrivateIP struct {
	NetworkInterfaceID string `k8s:"private-ip-nif-id"`
}

type S3

type S3 interface {
	PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
}

Jump to

Keyboard shortcuts

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