Documentation ¶
Index ¶
- Constants
- func ValidateVolumeMounts(volumes []VolumeMount) error
- type AutoScalingGroup
- type ClusterAutoscaler
- type Controller
- type ControllerElb
- type Etcd
- func (e Etcd) AdvertisedFQDNTagKey() string
- func (e Etcd) EIPAllocationIDTagKey() string
- func (e Etcd) HostedZoneLogicalName() (string, error)
- func (e Etcd) HostedZoneManaged() bool
- func (e Etcd) HostedZoneRef() (string, error)
- func (e Etcd) InternalDomainName() (string, error)
- func (e Etcd) KMSKeyARN() string
- func (i Etcd) LogicalName() string
- func (e Etcd) NameTagKey() string
- func (e Etcd) NetworkInterfaceDeviceIndex() int
- func (e Etcd) NetworkInterfaceIDTagKey() string
- func (e Etcd) NodeShouldHaveEIP() bool
- func (e Etcd) NodeShouldHaveSecondaryENI() bool
- type EtcdCluster
- type EtcdNode
- type Identifier
- type Image
- type InternetGateway
- type LaunchSpecification
- type NATGateway
- type NATGatewayConfig
- type NodePoolConfig
- type Region
- func (r Region) IsChina() bool
- func (r Region) IsEmpty() bool
- func (r Region) Partition() string
- func (r Region) PrivateDomainName() string
- func (r Region) PublicComputeDomainName() string
- func (r Region) PublicDomainName() string
- func (r Region) S3Endpoint() string
- func (r Region) String() string
- func (r Region) SupportsKMS() bool
- type RootVolume
- type RouteTable
- type SpotFleet
- type Subnet
- func NewExistingPrivateSubnet(az string, id string) Subnet
- func NewExistingPublicSubnet(az string, id string) Subnet
- func NewImportedPrivateSubnet(az string, name string) Subnet
- func NewImportedPublicSubnet(az string, name string) Subnet
- func NewPrivateSubnet(az string, cidr string) Subnet
- func NewPrivateSubnetFromFn(az string, fn string) Subnet
- func NewPrivateSubnetWithPreconfiguredNATGateway(az string, cidr string, ngw string) Subnet
- func NewPrivateSubnetWithPreconfiguredNATGatewayEIP(az string, cidr string, alloc string) Subnet
- func NewPrivateSubnetWithPreconfiguredRouteTable(az string, cidr string, rtb string) Subnet
- func NewPublicSubnet(az string, cidr string) Subnet
- func NewPublicSubnetFromFn(az string, fn string) Subnet
- func NewPublicSubnetWithPreconfiguredRouteTable(az string, cidr string, rtb string) Subnet
- func (s *Subnet) InternetGatewayRouteLogicalName() string
- func (s *Subnet) LogicalName() string
- func (s *Subnet) ManageNATGateway() bool
- func (s *Subnet) ManageRouteTable() bool
- func (s *Subnet) ManageRouteToInternet() bool
- func (s *Subnet) ManageRouteToNATGateway() bool
- func (s *Subnet) ManageSubnet() bool
- func (s *Subnet) MapPublicIPs() bool
- func (s *Subnet) NATGatewayRouteLogicalName() string
- func (s *Subnet) Public() bool
- func (s *Subnet) Ref() string
- func (s *Subnet) RouteTableID() string
- func (s *Subnet) RouteTableLogicalName() (string, error)
- func (s *Subnet) RouteTableRef() (string, error)
- func (s *Subnet) Validate() error
- type UnknownKeys
- type VolumeMount
Constants ¶
const ( MemberIdentityProviderEIP = "eip" MemberIdentityProviderENI = "eni" )
Variables ¶
This section is empty.
Functions ¶
func ValidateVolumeMounts ¶
func ValidateVolumeMounts(volumes []VolumeMount) error
Types ¶
type AutoScalingGroup ¶
type AutoScalingGroup struct { MinSize *int `yaml:"minSize,omitempty"` MaxSize int `yaml:"maxSize,omitempty"` RollingUpdateMinInstancesInService *int `yaml:"rollingUpdateMinInstancesInService,omitempty"` UnknownKeys `yaml:",inline"` }
Configuration specific to auto scaling groups
func (AutoScalingGroup) Valid ¶
func (asg AutoScalingGroup) Valid() error
type ClusterAutoscaler ¶
type ClusterAutoscaler struct { MinSize int `yaml:"minSize"` MaxSize int `yaml:"maxSize"` UnknownKeys `yaml:",inline"` }
func (ClusterAutoscaler) Enabled ¶
func (a ClusterAutoscaler) Enabled() bool
type Controller ¶
type Controller struct { AutoScalingGroup AutoScalingGroup `yaml:"autoScalingGroup,omitempty"` ClusterAutoscaler ClusterAutoscaler `yaml:"clusterAutoscaler,omitempty"` LoadBalancer ControllerElb `yaml:"loadBalancer,omitempty"` ManagedIamRoleName string `yaml:"managedIamRoleName,omitempty"` Subnets []Subnet `yaml:"subnets,omitempty"` UnknownKeys `yaml:",inline"` }
TODO Merge this with NodePoolConfig
func NewDefaultController ¶
func NewDefaultController() Controller
func (Controller) LogicalName ¶
func (c Controller) LogicalName() string
func (Controller) Validate ¶
func (c Controller) Validate() error
type ControllerElb ¶
type Etcd ¶
type Etcd struct { Subnets []Subnet `yaml:"subnets,omitempty"` Nodes []EtcdNode `yaml:"nodes,omitempty"` Cluster EtcdCluster `yaml:",inline"` UnknownKeys `yaml:",inline"` }
func (Etcd) AdvertisedFQDNTagKey ¶
AdvertisedFQDNTagKey returns the key of the tag used to identify the advertised hostname of the etcd member of an EBS volume
func (Etcd) EIPAllocationIDTagKey ¶
EIPAllocationIDTagKey returns the key of the tag used to identify the EIP for the etcd member of an EBS volume
func (Etcd) HostedZoneLogicalName ¶
func (Etcd) HostedZoneManaged ¶
func (Etcd) HostedZoneRef ¶
func (Etcd) InternalDomainName ¶
func (Etcd) LogicalName ¶
func (Etcd) NameTagKey ¶
NameTagKey returns the key of the tag used to identify the name of the etcd member of an EBS volume
func (Etcd) NetworkInterfaceDeviceIndex ¶
NetworkInterfaceDeviceIndex represents that the network interface at index 1 is reserved by kube-aws for etcd peer communication Please submit a feature request if this is inconvenient for you
func (Etcd) NetworkInterfaceIDTagKey ¶
NetworkInterfaceIDTagKey returns the key of the tag used to identify the ENI for the etcd member of an EBS volume
func (Etcd) NodeShouldHaveEIP ¶
func (Etcd) NodeShouldHaveSecondaryENI ¶
type EtcdCluster ¶
type EtcdCluster struct { InternalDomainName string `yaml:"internalDomainName,omitempty"` MemberIdentityProvider string `yaml:"memberIdentityProvider,omitempty"` HostedZone Identifier `yaml:"hostedZone,omitempty"` ManageRecordSets *bool `yaml:"manageRecordSets,omitempty"` KMSKeyARN string `yaml:"kmsKeyArn,omitempty"` }
func (EtcdCluster) EC2InternalDomainUsed ¶
func (c EtcdCluster) EC2InternalDomainUsed() bool
func (EtcdCluster) GetMemberIdentityProvider ¶
func (c EtcdCluster) GetMemberIdentityProvider() string
func (EtcdCluster) NodeShouldHaveEIP ¶
func (c EtcdCluster) NodeShouldHaveEIP() bool
NodeShouldHaveEIP returns true if all the etcd nodes should have EIPs for their identities
func (EtcdCluster) NodeShouldHaveSecondaryENI ¶
func (c EtcdCluster) NodeShouldHaveSecondaryENI() bool
NodeShouldHaveSecondaryENI returns true if all the etcd nodes should have secondary ENIs for their identities
func (EtcdCluster) RecordSetsManaged ¶
func (e EtcdCluster) RecordSetsManaged() bool
Notes: * EC2's default domain like <region>.compute.internal for internalDomainName implies not to manage record sets * Managed hosted zone implies managed record sets
type Identifier ¶
type Identifier struct { ID string `yaml:"id,omitempty"` IDFromStackOutput string `yaml:"idFromStackOutput,omitempty"` IDFromFn string `yaml:"idFromFn,omitempty"` }
func (Identifier) HasIdentifier ¶
func (i Identifier) HasIdentifier() bool
func (Identifier) Ref ¶
func (i Identifier) Ref(logicalNameProvider func() string) string
func (Identifier) RefOrError ¶
func (i Identifier) RefOrError(logicalNameProvider func() (string, error)) (string, error)
RefOrError should be used instead of Ref where possible so that kube-aws can print a more useful error message with the line number for the stack-template.json when there's an error.
func (Identifier) Validate ¶
func (i Identifier) Validate() error
type Image ¶
type Image struct { Repo string `yaml:"repo,omitempty"` RktPullDocker bool `yaml:"rktPullDocker,omitempty"` Tag string `yaml:"tag,omitempty"` }
func (*Image) MergeIfEmpty ¶
func (*Image) RepoWithTag ¶
func (*Image) RktRepoWithoutTag ¶
type InternetGateway ¶
type InternetGateway struct {
Identifier `yaml:",inline"`
}
func (InternetGateway) ManageInternetGateway ¶
func (g InternetGateway) ManageInternetGateway() bool
type LaunchSpecification ¶
type LaunchSpecification struct { WeightedCapacity int `yaml:"weightedCapacity,omitempty"` InstanceType string `yaml:"instanceType,omitempty"` SpotPrice string `yaml:"spotPrice,omitempty"` RootVolume `yaml:",inline"` }
func NewLaunchSpecification ¶
func NewLaunchSpecification(weightedCapacity int, instanceType string) LaunchSpecification
func (LaunchSpecification) Valid ¶
func (c LaunchSpecification) Valid() error
type NATGateway ¶
type NATGateway interface { EIPAllocationIDRef() (string, error) EIPLogicalName() (string, error) IsConnectedToPrivateSubnet(Subnet) bool LogicalName() string ManageEIP() bool ManageNATGateway() bool ManageRoute() bool Ref() string PublicSubnetRef() (string, error) PrivateSubnets() []Subnet Validate() error }
kube-aws manages at most one NAT gateway per subnet
func NewManagedNATGateway ¶
func NewManagedNATGateway(c NATGatewayConfig, private Subnet, public Subnet) NATGateway
func NewUnmanagedNATGateway ¶
func NewUnmanagedNATGateway(c NATGatewayConfig, private Subnet) NATGateway
type NATGatewayConfig ¶
type NATGatewayConfig struct { Identifier `yaml:",inline"` EIPAllocationID string `yaml:"eipAllocationId,omitempty"` }
func (NATGatewayConfig) Validate ¶
func (c NATGatewayConfig) Validate() error
type NodePoolConfig ¶
type NodePoolConfig struct { AutoScalingGroup AutoScalingGroup `yaml:"autoScalingGroup,omitempty"` ClusterAutoscaler ClusterAutoscaler `yaml:"clusterAutoscaler"` SpotFleet SpotFleet `yaml:"spotFleet,omitempty"` Count *int `yaml:"count,omitempty"` CreateTimeout string `yaml:"createTimeout,omitempty"` InstanceType string `yaml:"instanceType,omitempty"` ManagedIamRoleName string `yaml:"managedIamRoleName,omitempty"` RootVolume `yaml:",inline"` SpotPrice string `yaml:"spotPrice,omitempty"` SecurityGroupIds []string `yaml:"securityGroupIds,omitempty"` Tenancy string `yaml:"tenancy,omitempty"` CustomSettings map[string]interface{} `yaml:"customSettings,omitempty"` VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"` UnknownKeys `yaml:",inline"` }
func NewDefaultNodePoolConfig ¶
func NewDefaultNodePoolConfig() NodePoolConfig
func (NodePoolConfig) LogicalName ¶
func (c NodePoolConfig) LogicalName() string
func (NodePoolConfig) MaxCount ¶
func (c NodePoolConfig) MaxCount() int
func (NodePoolConfig) MinCount ¶
func (c NodePoolConfig) MinCount() int
func (NodePoolConfig) RollingUpdateMinInstancesInService ¶
func (c NodePoolConfig) RollingUpdateMinInstancesInService() int
func (NodePoolConfig) Valid ¶
func (c NodePoolConfig) Valid() error
type Region ¶
type Region struct {
Name string `yaml:"region,omitempty"`
}
func RegionForName ¶
func (Region) PrivateDomainName ¶
func (Region) PublicComputeDomainName ¶
func (Region) PublicDomainName ¶
func (Region) S3Endpoint ¶
func (Region) SupportsKMS ¶
type RootVolume ¶
type RootVolume struct { RootVolumeType string `yaml:"rootVolumeType,omitempty"` RootVolumeIOPS int `yaml:"rootVolumeIOPS,omitempty"` RootVolumeSize int `yaml:"rootVolumeSize,omitempty"` }
func NewGp2RootVolume ¶
func NewGp2RootVolume(size int) RootVolume
func NewIo1RootVolume ¶
func NewIo1RootVolume(size int, iops int) RootVolume
func (RootVolume) Validate ¶
func (v RootVolume) Validate() error
type RouteTable ¶
type RouteTable struct {
Identifier `yaml:",inline"`
}
kube-aws manages at most one route table per subnet If ID or IDFromStackOutput is non-zero, kube-aws doesn't manage the route table but its users' responsibility to provide properly configured one to be reused by kube-aws. More concretely: * If an user is going to reuse an existing route table for a private subnet, it must have a route to a NAT gateway
- A NAT gateway can be either a classical one with a NAT EC2 instance or an AWS-managed one
* IF an user is going to reuse an existing route table for a public subnet, it must have a route to an Internet gateway
type SpotFleet ¶
type SpotFleet struct { TargetCapacity int `yaml:"targetCapacity,omitempty"` SpotPrice string `yaml:"spotPrice,omitempty"` IAMFleetRoleARN string `yaml:"iamFleetRoleArn,omitempty"` RootVolumeType string `yaml:"rootVolumeType"` UnitRootVolumeSize int `yaml:"unitRootVolumeSize"` UnitRootVolumeIOPS int `yaml:"unitRootVolumeIOPS"` LaunchSpecifications []LaunchSpecification `yaml:"launchSpecifications,omitempty"` UnknownKeys `yaml:",inline"` }
UnitRootVolumeSize/IOPS are used for spot fleets instead of WorkerRootVolumeSize/IOPS, so that we can make them clearer that they are not default size/iops for each worker node but "size/iops per unit" as their names suggest
func (SpotFleet) IAMFleetRoleRef ¶
func (SpotFleet) WithDefaults ¶
type Subnet ¶
type Subnet struct { Identifier `yaml:",inline"` AvailabilityZone string `yaml:"availabilityZone,omitempty"` Name string `yaml:"name,omitempty"` InstanceCIDR string `yaml:"instanceCIDR,omitempty"` InternetGateway InternetGateway `yaml:"internetGateway,omitempty"` NATGateway NATGatewayConfig `yaml:"natGateway,omitempty"` Private bool `yaml:"private,omitempty"` RouteTable RouteTable `yaml:"routeTable,omitempty"` }
func NewExistingPublicSubnet ¶
func NewImportedPublicSubnet ¶
func NewPrivateSubnet ¶
func NewPrivateSubnetFromFn ¶
func NewPublicSubnet ¶
func NewPublicSubnetFromFn ¶
func (*Subnet) InternetGatewayRouteLogicalName ¶
func (*Subnet) LogicalName ¶
func (*Subnet) ManageNATGateway ¶
ManageNATGateway returns true if a NAT gateway for this subnet must be created or updated by kube-aws kube-aws creates or updates a NAT gateway if: * the subnet is private and * the subnet is going to be managed by kube-aws(an existing subnet is NOT specified) and * the route table for the subnet is going to be managed by kube-aws(an existing subnet is NOT specified) and * an existing NAT gateway ID is not specified to be reused
func (*Subnet) ManageRouteTable ¶
ManageRouteTable returns true if a route table for this subnet must be created or updated by kube-aws kube-aws creates a route table if and only if the subnet is also going to be managed and an existing route table for it isn't specified
func (*Subnet) ManageRouteToInternet ¶
ManageRouteToInternet returns true if a route from this subnet to an IGW must be created or updated by kube-aws kube-aws creates a route to an IGW for an subnet if and only if: * the subnet is public and * the subnet is going to be managed by kube-aws and * the route table is going to be managed by kube-aws In other words, kube-aws won't create or update a route to an IGW if: * the subnet is private or * an existing subnet is used or * an existing route table is used
func (*Subnet) ManageRouteToNATGateway ¶
ManageRouteToNATGateway returns true if a route to a NAT gateway for this subnet must be created or updated by kube-aws kube-aws creates or updates a NAT gateway if: * the NGW is going to be managed or * an existing NAT gateway ID is specified
func (*Subnet) ManageSubnet ¶
ManageSubnet returns true if this subnet must be managed(created or updated) by kube-aws kube-aws creates a subnet if subnet.id and subnet.idFromStackOutput are not specified
func (*Subnet) MapPublicIPs ¶
func (*Subnet) NATGatewayRouteLogicalName ¶
func (*Subnet) RouteTableID ¶
func (*Subnet) RouteTableLogicalName ¶
RouteTableLogicalName represents the name of the route table to which this subnet is associated.
func (*Subnet) RouteTableRef ¶
type UnknownKeys ¶
type UnknownKeys map[string]interface{}
func (UnknownKeys) FailWhenUnknownKeysFound ¶
func (unknownKeys UnknownKeys) FailWhenUnknownKeysFound(keyPath string) error
type VolumeMount ¶
type VolumeMount struct { Type string `yaml:"type,omitempty"` Iops int `yaml:"iops,omitempty"` Size int `yaml:"size,omitempty"` Device string `yaml:"device,omitempty"` Path string `yaml:"path,omitempty"` }
func (VolumeMount) SystemdMountName ¶
func (v VolumeMount) SystemdMountName() string
func (VolumeMount) Validate ¶
func (v VolumeMount) Validate() error