Documentation ¶
Index ¶
- Constants
- Variables
- func ValidateVolumeMounts(volumes []VolumeMount) error
- type APIEndpoint
- type APIEndpointLB
- func (e APIEndpointLB) ManageELB() bool
- func (e APIEndpointLB) ManageELBRecordSet() bool
- func (e APIEndpointLB) ManageSecurityGroup() bool
- func (e APIEndpointLB) Private() bool
- func (e APIEndpointLB) RecordSetTTL() int
- func (e *APIEndpointLB) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (e APIEndpointLB) Validate() error
- type APIEndpoints
- type ARN
- type Addons
- type Asset
- type AssetID
- type AssetLocation
- type AutoScalingGroup
- type Autoscaling
- type CIDRRange
- type CIDRRanges
- type ClusterAutoscaler
- type ClusterAutoscalerSupport
- type Controller
- type ControllerElb
- type CustomFile
- type CustomSystemdUnit
- type DataVolume
- type EC2Instance
- 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
- func (e Etcd) SecurityGroupRefs() []string
- func (e Etcd) SystemdUnitName() string
- func (e Etcd) Version() EtcdVersion
- type EtcdCluster
- type EtcdDisasterRecovery
- type EtcdNode
- type EtcdSnapshot
- type EtcdVersion
- type FeatureGates
- type Gpu
- type HostedZone
- type IAMConfig
- type IAMInstanceProfile
- type IAMManagedPolicy
- type IAMPolicy
- type IAMPolicyStatement
- type IAMPolicyStatements
- type IAMRole
- type Identifier
- type Image
- type InternetGateway
- type LaunchSpecification
- type NATGateway
- type NATGatewayConfig
- type NodeDrainer
- type NodeLabels
- type NodePoolConfig
- type NodeSettings
- type NvidiaSetting
- type Oidc
- type PartDesc
- type PluginConfig
- type PluginConfigs
- 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 Rescheduler
- type RootVolume
- type RouteTable
- type S3Folder
- type S3Folders
- type SecurityGroup
- 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 SubnetReference
- type SystemdMessageResponse
- type Taint
- type Taints
- type UnknownKeys
- type UserData
- type UserDataOption
- type UserDataPart
- type UserDataValidateFunc
- type VPC
- type Values
- type VolumeMount
Constants ¶
const ( MemberIdentityProviderEIP = "eip" MemberIdentityProviderENI = "eni" )
const ( USERDATA_S3 = "s3" USERDATA_INSTANCE = "instance" )
const DefaultAPIEndpointName = "Default"
DefaultAPIEndpointName is the default endpoint name used when you've omitted `apiEndpoints` but not `externalDNSName`
const DefaultControllerCount = 1
const DefaultRecordSetTTL = 300
DefaultRecordSetTTL is the default value for the loadBalancer.recordSetTTL key
Variables ¶
var GPUEnabledInstanceFamily = []string{"p2", "g2"}
Functions ¶
func ValidateVolumeMounts ¶
func ValidateVolumeMounts(volumes []VolumeMount) error
Types ¶
type APIEndpoint ¶ added in v0.9.6
type APIEndpoint struct { // Name is the unique name of this API endpoint used by kube-aws for identifying this API endpoint Name string `yaml:"name,omitempty"` // DNSName is the FQDN of this endpoint // A record set may or may not be created with this DNS name. // TLS certificates generated by kube-aws would contain this name in the list of common names. DNSName string `yaml:"dnsName,omitempty"` // LoadBalancer is a set of an ELB and relevant settings and resources to serve a Kubernetes API hosted by controller nodes LoadBalancer APIEndpointLB `yaml:"loadBalancer,omitempty"` //DNSRoundRobin APIDNSRoundRobin `yaml:"dnsRoundRobin,omitempty"` UnknownKeys `yaml:",inline"` }
APIEndpoint is a Kubernetes API endpoint to which various clients connect. Each endpoint can be served by an existing ELB or a kube-aws managed ELB.
func (APIEndpoint) Validate ¶ added in v0.9.6
func (e APIEndpoint) Validate() error
Validate returns an error when there's any user error in the `apiEndpoint` settings
type APIEndpointLB ¶ added in v0.9.6
type APIEndpointLB struct { // APIAccessAllowedSourceCIDRs is network ranges of sources you'd like Kubernetes API accesses to be allowed from, in CIDR notation APIAccessAllowedSourceCIDRs CIDRRanges `yaml:"apiAccessAllowedSourceCIDRs,omitempty"` // CreateRecordSet is set to false when you want to disable creation of the record set for this api load balancer CreateRecordSet *bool `yaml:"createRecordSet,omitempty"` // Identifier specifies an existing load-balancer used for load-balancing controller nodes and serving this endpoint Identifier Identifier `yaml:",inline"` // Subnets contains all the subnets assigned to this load-balancer. Specified only when this load balancer is not reused but managed one SubnetReferences []SubnetReference `yaml:"subnets,omitempty"` // PrivateSpecified determines the resulting load balancer uses an internal elb for an endpoint PrivateSpecified *bool `yaml:"private,omitempty"` // RecordSetTTLSpecified is the TTL for the record set to this load balancer. Defaults to 300 if nil RecordSetTTLSpecified *int `yaml:"recordSetTTL,omitempty"` // HostedZone is where the resulting Alias record is created for an endpoint HostedZone HostedZone `yaml:"hostedZone,omitempty"` //// SecurityGroups contains extra security groups must be associated to the lb serving API requests from clients //SecurityGroups []SecurityGroup // SecurityGroupIds represents SGs associated to this LB. Required when APIAccessAllowedSourceCIDRs is explicitly set to empty SecurityGroupIds []string `yaml:"securityGroupIds"` }
APIEndpointLB is a set of an ELB and relevant settings and resources to serve a Kubernetes API hosted by controller nodes
func (APIEndpointLB) ManageELB ¶ added in v0.9.6
func (e APIEndpointLB) ManageELB() bool
ManageELB returns true if an ELB should be managed by kube-aws
func (APIEndpointLB) ManageELBRecordSet ¶ added in v0.9.6
func (e APIEndpointLB) ManageELBRecordSet() bool
ManageELBRecordSet returns tru if kube-aws should create a record set for the ELB
func (APIEndpointLB) ManageSecurityGroup ¶ added in v0.9.6
func (e APIEndpointLB) ManageSecurityGroup() bool
ManageSecurityGroup returns true if kube-aws should create a security group for this ELB
func (APIEndpointLB) Private ¶ added in v0.9.6
func (e APIEndpointLB) Private() bool
Private returns true when this LB is a private one i.e. the `private` field is explicitly set to true
func (APIEndpointLB) RecordSetTTL ¶ added in v0.9.6
func (e APIEndpointLB) RecordSetTTL() int
RecordSetTTL is the TTL for the record set to this load balancer. Defaults to 300 if `recordSetTTL` is omitted/set to nil
func (*APIEndpointLB) UnmarshalYAML ¶ added in v0.9.6
func (e *APIEndpointLB) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshals YAML data to an APIEndpointLB object with defaults This doesn't work due to a go-yaml issue described in http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/ And that's why we need to implement `func (e APIEndpointLB) RecordSetTTL() int` for defaulting. TODO Migrate to ghodss/yaml
func (APIEndpointLB) Validate ¶ added in v0.9.6
func (e APIEndpointLB) Validate() error
Validate returns an error when there's any user error in the settings of the `loadBalancer` field
type APIEndpoints ¶ added in v0.9.6
type APIEndpoints []APIEndpoint
func NewDefaultAPIEndpoints ¶ added in v0.9.6
func NewDefaultAPIEndpoints(dnsName string, subnets []SubnetReference, hostedZoneId string, createRecordSet bool, recordSetTTL int, private bool) APIEndpoints
NewDefaultAPIEndpoints creates the slice of API endpoints containing only the default one which is with arbitrary DNS name and an ELB
func (APIEndpoints) Validate ¶ added in v0.9.6
func (e APIEndpoints) Validate() error
Validate returns an error if there's any user error in the settings of apiEndpoints
type ARN ¶ added in v0.9.8
type ARN struct { Arn string `yaml:"arn,omitempty"` ArnFromStackOutput string `yaml:"arnFromStackOutput,omitempty"` ArnFromFn string `yaml:"arnFromFn,omitempty"` }
func (ARN) HasArn ¶ added in v0.9.8
HasArn returns true when the id of a resource i.e. either `arn` or `arnFromStackOutput` is specified
func (ARN) OrGetAttArn ¶ added in v0.9.8
type Addons ¶ added in v0.9.6
type Addons struct { Rescheduler Rescheduler `yaml:"rescheduler"` ClusterAutoscaler ClusterAutoscalerSupport `yaml:"clusterAutoscaler,omitempty"` UnknownKeys `yaml:",inline"` }
type Asset ¶ added in v0.9.7
type Asset struct { AssetLocation Content string }
type AssetID ¶ added in v0.9.7
func NewAssetID ¶ added in v0.9.7
type AssetLocation ¶ added in v0.9.7
func (AssetLocation) S3URL ¶ added in v0.9.7
func (l AssetLocation) S3URL() (string, error)
func (AssetLocation) URL ¶ added in v0.9.7
func (l AssetLocation) URL() (string, error)
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) Validate ¶ added in v0.9.8
func (asg AutoScalingGroup) Validate() error
type Autoscaling ¶ added in v0.9.7
type Autoscaling struct {
ClusterAutoscaler ClusterAutoscaler `yaml:"clusterAutoscaler,omitempty"`
}
type CIDRRange ¶ added in v0.9.6
type CIDRRange struct {
// contains filtered or unexported fields
}
CIDRRange represents an IP network range in CIDR notation See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group-ingress.html#cfn-ec2-security-group-ingress-cidrip
func (CIDRRange) String ¶ added in v0.9.6
String returns the string representation of this CIDR range
func (*CIDRRange) UnmarshalYAML ¶ added in v0.9.6
type CIDRRanges ¶ added in v0.9.6
type CIDRRanges []CIDRRange
CIDRRanges represents IP network ranges in CIDR notation
func DefaultCIDRRanges ¶ added in v0.9.6
func DefaultCIDRRanges() CIDRRanges
type ClusterAutoscaler ¶
type ClusterAutoscaler struct { Enabled bool `yaml:"enabled,omitempty"` UnknownKeys `yaml:",inline"` }
func (ClusterAutoscaler) AutoDiscoveryTagKey ¶ added in v0.9.7
func (a ClusterAutoscaler) AutoDiscoveryTagKey() string
type ClusterAutoscalerSupport ¶ added in v0.9.7
type ClusterAutoscalerSupport struct { Enabled bool `yaml:"enabled"` UnknownKeys `yaml:",inline"` }
type Controller ¶
type Controller struct { AutoScalingGroup AutoScalingGroup `yaml:"autoScalingGroup,omitempty"` Autoscaling Autoscaling `yaml:"autoscaling,omitempty"` EC2Instance `yaml:",inline"` LoadBalancer ControllerElb `yaml:"loadBalancer,omitempty"` IAMConfig IAMConfig `yaml:"iam,omitempty"` SecurityGroupIds []string `yaml:"securityGroupIds"` Subnets []Subnet `yaml:"subnets,omitempty"` CustomFiles []CustomFile `yaml:"customFiles,omitempty"` CustomSystemdUnits []CustomSystemdUnit `yaml:"customSystemdUnits,omitempty"` NodeSettings `yaml:",inline"` UnknownKeys `yaml:",inline"` }
TODO Merge this with NodePoolConfig
func NewDefaultController ¶
func NewDefaultController() Controller
func (Controller) LogicalName ¶
func (c Controller) LogicalName() string
func (Controller) SecurityGroupRefs ¶ added in v0.9.6
func (c Controller) SecurityGroupRefs() []string
func (Controller) Validate ¶
func (c Controller) Validate() error
type ControllerElb ¶
type CustomFile ¶ added in v0.9.6
type CustomFile struct { Path string `yaml:"path"` Permissions uint `yaml:"permissions"` Content string `yaml:"content"` UnknownKeys `yaml:",inline"` }
func (CustomFile) GzippedBase64Content ¶ added in v0.9.6
func (c CustomFile) GzippedBase64Content() string
func (CustomFile) PermissionsString ¶ added in v0.9.6
func (c CustomFile) PermissionsString() string
type CustomSystemdUnit ¶ added in v0.9.6
type CustomSystemdUnit struct { Name string `yaml:"name"` Command string `yaml:"command"` Content string `yaml:"content"` Enable bool `yaml:"enable,omitempty"` Runtime bool `yaml:"runtime,omitempty"` UnknownKeys `yaml:",inline"` }
func (CustomSystemdUnit) ContentArray ¶ added in v0.9.6
func (c CustomSystemdUnit) ContentArray() []string
func (CustomSystemdUnit) EnableString ¶ added in v0.9.6
func (c CustomSystemdUnit) EnableString() string
func (CustomSystemdUnit) RuntimeString ¶ added in v0.9.6
func (c CustomSystemdUnit) RuntimeString() string
type DataVolume ¶ added in v0.9.6
type EC2Instance ¶ added in v0.9.6
type EC2Instance struct { Count int `yaml:"count,omitempty"` CreateTimeout string `yaml:"createTimeout,omitempty"` InstanceType string `yaml:"instanceType,omitempty"` RootVolume `yaml:"rootVolume,omitempty"` Tenancy string `yaml:"tenancy,omitempty"` }
type Etcd ¶
type Etcd struct { Cluster EtcdCluster `yaml:",inline"` CustomFiles []CustomFile `yaml:"customFiles,omitempty"` CustomSystemdUnits []CustomSystemdUnit `yaml:"customSystemdUnits,omitempty"` DataVolume DataVolume `yaml:"dataVolume,omitempty"` DisasterRecovery EtcdDisasterRecovery `yaml:"disasterRecovery,omitempty"` EC2Instance `yaml:",inline"` IAMConfig IAMConfig `yaml:"iam,omitempty"` Nodes []EtcdNode `yaml:"nodes,omitempty"` SecurityGroupIds []string `yaml:"securityGroupIds"` Snapshot EtcdSnapshot `yaml:"snapshot,omitempty"` Subnets []Subnet `yaml:"subnets,omitempty"` UnknownKeys `yaml:",inline"` }
func NewDefaultEtcd ¶ added in v0.9.6
func NewDefaultEtcd() Etcd
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 ¶
func (Etcd) SecurityGroupRefs ¶ added in v0.9.6
func (Etcd) SystemdUnitName ¶ added in v0.9.6
func (Etcd) Version ¶ added in v0.9.6
func (e Etcd) Version() EtcdVersion
Version returns the version of etcd (e.g. `3.2.1`) to be used for this etcd cluster
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"` Version EtcdVersion `yaml:"version,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 EtcdDisasterRecovery ¶ added in v0.9.6
type EtcdDisasterRecovery struct {
Automated bool `yaml:"automated,omitempty"`
}
func (EtcdDisasterRecovery) IsAutomatedForEtcdVersion ¶ added in v0.9.6
func (r EtcdDisasterRecovery) IsAutomatedForEtcdVersion(etcdVersion EtcdVersion) bool
func (EtcdDisasterRecovery) SupportsEtcdVersion ¶ added in v0.9.6
func (r EtcdDisasterRecovery) SupportsEtcdVersion(etcdVersion EtcdVersion) bool
Supported returns true when the disaster recovery feature provided by etcdadm can be enabled on the specified version of etcd
type EtcdSnapshot ¶ added in v0.9.6
type EtcdSnapshot struct {
Automated bool `yaml:"automated,omitempty"`
}
func (EtcdSnapshot) IsAutomatedForEtcdVersion ¶ added in v0.9.6
func (s EtcdSnapshot) IsAutomatedForEtcdVersion(etcdVersion EtcdVersion) bool
type EtcdVersion ¶ added in v0.9.6
type EtcdVersion string
func (EtcdVersion) Is3 ¶ added in v0.9.6
func (v EtcdVersion) Is3() bool
func (EtcdVersion) String ¶ added in v0.9.6
func (v EtcdVersion) String() string
type FeatureGates ¶ added in v0.9.8
func (FeatureGates) Enabled ¶ added in v0.9.8
func (l FeatureGates) Enabled() bool
func (FeatureGates) String ¶ added in v0.9.8
func (l FeatureGates) String() string
Returns key=value pairs separated by ',' to be passed to kubelet's `--feature-gates` flag
type Gpu ¶ added in v0.9.7
type Gpu struct {
Nvidia NvidiaSetting `yaml:"nvidia"`
}
type HostedZone ¶ added in v0.9.6
type HostedZone struct { // Identifier should include the hosted zone ID for a private or public hosted zone, // to make DNS names available to an internal network or the internet respectively Identifier `yaml:",inline"` }
HostedZone is a AWS Route 53 hosted zone in which record sets are created. Record sts are created to register DNS records to make various DNS names of nodes and/or load LBs managed by kube-aws visible to an internal network or the internet
type IAMConfig ¶ added in v0.9.7
type IAMConfig struct { Role IAMRole `yaml:"role,omitempty"` InstanceProfile IAMInstanceProfile `yaml:"instanceProfile,omitempty"` UnknownKeys `yaml:",inline"` Policy IAMPolicy }
type IAMInstanceProfile ¶ added in v0.9.7
type IAMInstanceProfile struct {
ARN `yaml:",inline"`
}
type IAMManagedPolicy ¶ added in v0.9.7
type IAMManagedPolicy struct {
ARN `yaml:",inline"`
}
type IAMPolicy ¶ added in v0.9.8
type IAMPolicy struct { // Statements is a list of IAM policy statements for the IAM policy associated to the nodes // Each statement must be a valid go text template producing a valid json object Statements IAMPolicyStatements `yaml:"statements,omitempty"` }
type IAMPolicyStatement ¶ added in v0.9.8
type IAMPolicyStatements ¶ added in v0.9.8
type IAMPolicyStatements []IAMPolicyStatement
type IAMRole ¶ added in v0.9.7
type IAMRole struct { ARN `yaml:",inline"` Name string `yaml:"name,omitempty"` ManagedPolicies []IAMManagedPolicy `yaml:"managedPolicies,omitempty"` }
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
HasIdentifier returns true when the id of a resource i.e. either `id` or `idFromStackOutput` is specified
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:"rootVolume,omitempty"` }
func NewLaunchSpecification ¶
func NewLaunchSpecification(weightedCapacity int, instanceType string) LaunchSpecification
func (*LaunchSpecification) UnmarshalYAML ¶ added in v0.9.6
func (s *LaunchSpecification) UnmarshalYAML(unmarshal func(interface{}) error) error
func (LaunchSpecification) Validate ¶ added in v0.9.8
func (c LaunchSpecification) Validate() 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 NodeDrainer ¶ added in v0.9.7
func (*NodeDrainer) DrainTimeoutInSeconds ¶ added in v0.9.7
func (nd *NodeDrainer) DrainTimeoutInSeconds() int
func (*NodeDrainer) Validate ¶ added in v0.9.8
func (nd *NodeDrainer) Validate() error
type NodeLabels ¶ added in v0.9.7
func (NodeLabels) Enabled ¶ added in v0.9.7
func (l NodeLabels) Enabled() bool
func (NodeLabels) String ¶ added in v0.9.7
func (l NodeLabels) String() string
Returns key=value pairs separated by ',' to be passed to kubelet's `--node-labels` flag
type NodePoolConfig ¶
type NodePoolConfig struct { Autoscaling Autoscaling `yaml:"autoscaling,omitempty"` AutoScalingGroup AutoScalingGroup `yaml:"autoScalingGroup,omitempty"` SpotFleet SpotFleet `yaml:"spotFleet,omitempty"` EC2Instance `yaml:",inline"` IAMConfig IAMConfig `yaml:"iam,omitempty"` SpotPrice string `yaml:"spotPrice,omitempty"` SecurityGroupIds []string `yaml:"securityGroupIds,omitempty"` CustomSettings map[string]interface{} `yaml:"customSettings,omitempty"` VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"` UnknownKeys `yaml:",inline"` NodeSettings `yaml:",inline"` NodeStatusUpdateFrequency string `yaml:"nodeStatusUpdateFrequency"` CustomFiles []CustomFile `yaml:"customFiles,omitempty"` CustomSystemdUnits []CustomSystemdUnit `yaml:"customSystemdUnits,omitempty"` Gpu Gpu `yaml:"gpu"` }
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) Validate ¶ added in v0.9.8
func (c NodePoolConfig) Validate() error
type NodeSettings ¶ added in v0.9.8
type NodeSettings struct { FeatureGates FeatureGates `yaml:"featureGates"` NodeLabels NodeLabels `yaml:"nodeLabels"` Taints Taints `yaml:"taints"` }
func (NodeSettings) Validate ¶ added in v0.9.8
func (s NodeSettings) Validate() error
type NvidiaSetting ¶ added in v0.9.7
type NvidiaSetting struct { Enabled bool `yaml:"enabled,omitempty"` Version string `yaml:"version,omitempty"` }
func (NvidiaSetting) IsEnabledOn ¶ added in v0.9.7
func (c NvidiaSetting) IsEnabledOn(instanceType string) bool
This function is used when rendering cloud-config-worker
type PluginConfig ¶ added in v0.9.8
type PluginConfigs ¶ added in v0.9.8
type PluginConfigs map[string]PluginConfig
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 Rescheduler ¶ added in v0.9.6
type Rescheduler struct { Enabled bool `yaml:"enabled"` UnknownKeys `yaml:",inline"` }
type RootVolume ¶
type RootVolume struct { Size int `yaml:"size,omitempty"` Type string `yaml:"type,omitempty"` IOPS int `yaml:"iops,omitempty"` UnknownKeys `yaml:",inline"` }
func NewGp2RootVolume ¶
func NewGp2RootVolume(size int) RootVolume
func NewIo1RootVolume ¶
func NewIo1RootVolume(size int, iops int) RootVolume
func (RootVolume) RootVolumeIOPS ¶
func (v RootVolume) RootVolumeIOPS() int
func (RootVolume) RootVolumeSize ¶
func (v RootVolume) RootVolumeSize() int
func (RootVolume) RootVolumeType ¶
func (v RootVolume) RootVolumeType() string
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 S3Folders ¶ added in v0.9.6
type S3Folders struct {
// contains filtered or unexported fields
}
func NewS3Folders ¶ added in v0.9.6
func (S3Folders) ClusterBackups ¶ added in v0.9.6
func (S3Folders) ClusterExportedStacks ¶ added in v0.9.6
type SecurityGroup ¶ added in v0.9.6
type SecurityGroup struct {
Identifier `yaml:",inline"`
}
SecurityGroup references one of existing security groups in your AWS account
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) UnmarshalYAML ¶ added in v0.9.6
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 SubnetReference ¶ added in v0.9.6
type SubnetReference struct { // Name is the unique name of subnet to be referenced. // The subnet referenced by this name should be defined in the `subnets[]` field in the top-level of cluster.yaml Name string `yaml:"name,omitempty"` }
SubnetReference references one of subnets defined in the top-level of cluster.yaml
type SystemdMessageResponse ¶ added in v0.9.8
type SystemdMessageResponse struct { InstanceId string `json:"instanceId,omitempty"` Hostname string `json:"hostname,omitempty"` CmdName string `json:"cmdName,omitempty"` Exe string `json:"exe,omitempty"` CmdLine string `json:"cmdLine,omitempty"` SystemdUnit string `json:"systemdUnit,omitempty"` Priority string `json:"priority,omitempty"` Message string `json:"message,omitempty"` }
type Taint ¶ added in v0.9.6
type Taint struct { Key string `yaml:"key"` Value string `yaml:"value"` Effect string `yaml:"effect"` }
Taint is a k8s node taint which is added to nodes which requires pods to tolerate
type Taints ¶ added in v0.9.6
type Taints []Taint
Taints is a list of taints
type UnknownKeys ¶
type UnknownKeys map[string]interface{}
func (UnknownKeys) FailWhenUnknownKeysFound ¶
func (unknownKeys UnknownKeys) FailWhenUnknownKeysFound(keyPath string) error
type UserData ¶ added in v0.9.7
type UserData struct {
Parts map[string]*UserDataPart
}
UserData represents userdata which might be split across multiple storage types
func NewUserData ¶ added in v0.9.7
func NewUserData(templateFile string, context interface{}, opts ...UserDataOption) (UserData, error)
NewUserData creates userdata struct from template file. Template file is expected to have defined subtemplates (Parts) which are of various part and storage types
type UserDataOption ¶ added in v0.9.7
type UserDataOption func(*userDataOpt)
func UserDataPartsOpt ¶ added in v0.9.7
func UserDataPartsOpt(Parts ...PartDesc) UserDataOption
Parts to find in UserData template file
type UserDataPart ¶ added in v0.9.7
type UserDataPart struct { Asset Asset // contains filtered or unexported fields }
type UserDataValidateFunc ¶ added in v0.9.7
UserDataValidateFunc returns error if templated Part content doesn't pass validation
type VPC ¶ added in v0.9.8
type VPC struct {
Identifier `yaml:",inline"`
}
kube-aws manages at most one VPC per cluster If ID or IDFromStackOutput is non-zero, kube-aws doesn't manage the VPC 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 VPC, it must have an internet gateway attached and
- A valid internet gateway ID must be provided via `internetGateway.id` or `internetGateway.idFromStackOutput`. In other words, kube-aws doesn't create an internet gateway in an existing VPC.
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
Source Files ¶
- addons.go
- api_endpoint.go
- api_endpoint_lb.go
- api_endpoints.go
- arn.go
- asg.go
- assets.go
- autoscaling.go
- cidr_range.go
- cloudwatch_logging.go
- controller.go
- custom_file.go
- custom_systemd_unit.go
- data_volume.go
- ec2_instance.go
- etcd.go
- etcd_cluster.go
- etcd_node.go
- feature_gates.go
- gpu.go
- hosted_zone.go
- iamconfig.go
- identifier.go
- image.go
- internet_gateway.go
- lauch_specification.go
- nat_gateway.go
- node_drainer.go
- node_labels.go
- node_pool_config.go
- node_settings.go
- oidc.go
- plugin.go
- region.go
- root_volume.go
- s3_folders.go
- security_group.go
- spot_fleet.go
- subnet.go
- subnet_reference.go
- taint.go
- unknown_keys.go
- userdata.go
- volume_mount.go
- vpc.go