api

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAPIEndpointName is the default endpoint name used when you've omitted `apiEndpoints` but not `externalDNSName`
	DefaultAPIEndpointName = "Default"

	// DefaultLoadBalancerType is the default load balancer to be provisioned by kube-aws for the API endpoints
	DefaultLoadBalancerType = "classic"
)
View Source
const (

	// Experimental CSI support default image tags...
	CSIDefaultProvisionerImageTag     = "v1.3.1"
	CSIDefaultAttacherImageTag        = "v1.2.1"
	CSIDefaultLivenessProbeImageTag   = "v1.1.0"
	CSIDefaultNodeDriverRegistrarTag  = "v1.2.0"
	CSIDefaultAmazonEBSDriverImageTag = "v0.4.0"
)
View Source
const (
	MaxQuotaBackendBytes     int = 8 * 1024 * 1024 * 1024
	DefaultQuotaBackendBytes int = 2 * 1024 * 1024 * 1024
)
View Source
const (
	MemberIdentityProviderEIP = "eip"
	MemberIdentityProviderENI = "eni"
)
View Source
const (
	USERDATA_S3       = "s3"
	USERDATA_INSTANCE = "instance"

	USERDATA_INSTANCE_SCRIPT = "instance-script"
)
View Source
const DefaultControllerCount = 1
View Source
const DefaultRecordSetTTL = 300

DefaultRecordSetTTL is the default value for the loadBalancer.recordSetTTL key

Variables

View Source
var ETCD_VERSION string = ""
View Source
var GPUEnabledInstanceFamily = []string{"p2", "p3", "g2", "g3"}
View Source
var KUBERNETES_VERSION = "v99.99"

The version of kubernetes should be set through the top level 'build' script (not hidden away here)

View Source
var ShellColourCodeMap map[ShellColour]string = map[ShellColour]string{
	DefaultColour: `0m`,
	Black:         `0;30m`,
	Red:           `0;31m`,
	Green:         `0;32m`,
	Yellow:        `0;33m`,
	Blue:          `0;34m`,
	Magenta:       `0;35m`,
	Cyan:          `0;36m`,
	White:         `0;37m`,
	DarkGray:      `1;90m`,
	LightRed:      `1;31m`,
	LightGreen:    `1;32m`,
	LightYellow:   `1;33m`,
	LightBlue:     `1;34m`,
	LightMagenta:  `1;35m`,
	LightCyan:     `1;36m`,
	LightWhite:    `1;37m`,
}

Functions

func ValidateQuotaBackendBytes

func ValidateQuotaBackendBytes(bytes int) error

func ValidateRaid0Mounts

func ValidateRaid0Mounts(volumes []NodeVolumeMount, raid0s []Raid0Mount) error

func ValidateVolumeMounts

func ValidateVolumeMounts(volumes []NodeVolumeMount) error

Types

type APIEndpoint

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

func (e APIEndpoint) Validate() error

Validate returns an error when there's any user error in the `apiEndpoint` settings

type APIEndpointLB

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"`
	// Identifier specifies an existing load-balancer used for load-balancing controller nodes and serving this endpoint
	Identifier Identifier `yaml:",inline"`
	// Managed is set to true when want to create an ELB for this API endpoint. It is false by default i.e. considered to be false if nil
	Managed *bool `yaml:"managed,omitempty"`
	// 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"`
	// RecordSetManaged represents if the user wants kube-aws not to create a record set for this API load balancer
	// i.e. the user wants to configure Route53 or one's own DNS oneself
	RecordSetManaged *bool `yaml:"recordSetManaged,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"`
	// Load balancer type. It is 'classic' by default, but can be changed to 'network'
	Type *string `yaml:"type,omitempty"`
}

APIEndpointLB is a set of an ELB and relevant settings and resources to serve a Kubernetes API hosted by controller nodes

func (APIEndpointLB) ClassicLoadBalancer

func (e APIEndpointLB) ClassicLoadBalancer() bool

ClassicLoadBalancer returns true if the load balancer is a classic ELB

func (APIEndpointLB) LoadBalancerV2

func (e APIEndpointLB) LoadBalancerV2() bool

LoadBalancerV2 returns true if the load balancer is a ELBV2 load balancer (only network load balancer is supported for now)

func (APIEndpointLB) ManageELB

func (e APIEndpointLB) ManageELB() bool

ManageELB returns true if an ELB should be managed by kube-aws

func (APIEndpointLB) ManageELBRecordSet

func (e APIEndpointLB) ManageELBRecordSet() bool

ManageELBRecordSet returns true if kube-aws should create a record set for the ELB

func (APIEndpointLB) ManageSecurityGroup

func (e APIEndpointLB) ManageSecurityGroup() bool

ManageSecurityGroup returns true if kube-aws should create a security group for this ELB

func (APIEndpointLB) NetworkLoadBalancer

func (e APIEndpointLB) NetworkLoadBalancer() bool

NetworkLoadBalancer returns true if the load balancer is a ELBV2 network load balancer

func (APIEndpointLB) Private

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

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

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

func (e APIEndpointLB) Validate() error

Validate returns an error when there's any user error in the settings of the `loadBalancer` field

type APIEndpoints

type APIEndpoints []APIEndpoint

func NewDefaultAPIEndpoints

func NewDefaultAPIEndpoints(dnsName string, subnets []SubnetReference, hostedZoneId string, 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) HasNetworkLoadBalancers

func (e APIEndpoints) HasNetworkLoadBalancers() bool

HasNetworkLoadBalancers returns true if there's any API endpoint load balancer of type 'network'

func (APIEndpoints) Validate

func (e APIEndpoints) Validate() error

Validate returns an error if there's any user error in the settings of apiEndpoints

type APIServerAggregator

type APIServerAggregator struct {
	Enabled bool `yaml:"enabled"`
}

type APIServerVolume

type APIServerVolume struct {
	// Name is translated to both a volume mount's and volume's name
	Name string `yaml:"name,omitempty"`
	// Path is translated to both a volume mount's mountPath and a volume's hostPath
	Path     string `yaml:"path,omitempty"`
	ReadOnly bool   `yaml:"readOnly,omitempty"`
}

type APIServerVolumes

type APIServerVolumes []APIServerVolume

type ARN

type ARN struct {
	Arn                string `yaml:"arn,omitempty"`
	ArnFromStackOutput string `yaml:"arnFromStackOutput,omitempty"`
	ArnFromFn          string `yaml:"arnFromFn,omitempty"`
}

func (ARN) HasArn

func (i ARN) HasArn() bool

HasArn returns true when the id of a resource i.e. either `arn` or `arnFromStackOutput` is specified

func (ARN) OrExpr

func (i ARN) OrExpr(exprProvider func() (string, error)) (string, error)

func (ARN) OrGetAttArn

func (i ARN) OrGetAttArn(logicalNameProvider func() (string, error)) (string, error)

func (ARN) OrRef

func (i ARN) OrRef(logicalNameProvider func() (string, error)) (string, error)

func (ARN) Validate

func (i ARN) Validate() error

type AWSIAM

type AWSIAM struct {
	Enabled           bool   `yaml:"enabled"`
	BinaryDownloadURL string `yaml:"binaryDownloadURL"`
	ClusterID         string `yaml:"clusterID"`
}

func (AWSIAM) BinaryStorePathes

func (a AWSIAM) BinaryStorePathes() []string

type Addons

type Addons struct {
	Rescheduler         Rescheduler         `yaml:"rescheduler"`
	MetricsServer       MetricsServer       `yaml:"metricsServer,omitempty"`
	Prometheus          Prometheus          `yaml:"prometheus"`
	APIServerAggregator APIServerAggregator `yaml:"apiserverAggregator"`
	UnknownKeys         `yaml:",inline"`
}

type Admission

type Admission struct {
	AlwaysPullImages                     AlwaysPullImages                     `yaml:"alwaysPullImages"`
	OwnerReferencesPermissionEnforcement OwnerReferencesPermissionEnforcement `yaml:"ownerReferencesPermissionEnforcement"`
	EventRateLimit                       EventRateLimit                       `yaml:"eventRateLimit"`
}

type AlwaysPullImages

type AlwaysPullImages struct {
	Enabled bool `yaml:"enabled"`
}

type AmazonSsmAgent

type AmazonSsmAgent struct {
	Enabled     bool   `yaml:"enabled"`
	DownloadUrl string `yaml:"downloadUrl"`
	Sha1Sum     string `yaml:"sha1sum"`
}

type AmazonVPC

type AmazonVPC struct {
	Enabled bool `yaml:"enabled"`
}

func (AmazonVPC) MaxPodsScript

func (a AmazonVPC) MaxPodsScript() provisioner.Content

type Asset

type Asset struct {
	AssetLocation
	Content string
}

func (Asset) S3Prefix

func (l Asset) S3Prefix() (string, error)

type AssetID

type AssetID struct {
	StackName string
	Filename  string
}

func NewAssetID

func NewAssetID(stack string, file string) AssetID

type AssetLocation

type AssetLocation struct {
	ID     AssetID
	Key    string
	Bucket string
	Path   string
	Region Region
}

func (AssetLocation) S3URL

func (l AssetLocation) S3URL() (string, error)

func (AssetLocation) URL

func (l AssetLocation) URL() (string, error)

type AuditLog

type AuditLog struct {
	Enabled   bool   `yaml:"enabled"`
	LogPath   string `yaml:"logPath"`
	MaxAge    int    `yaml:"maxAge"`
	MaxBackup int    `yaml:"maxBackup"`
	MaxSize   int    `yaml:"maxSize"`
}

type Authentication

type Authentication struct {
	Webhook Webhook `yaml:"webhook"`
}

type AutoScalingGroup

type AutoScalingGroup struct {
	MinSize                            *int           `yaml:"minSize,omitempty"`
	MaxSize                            int            `yaml:"maxSize,omitempty"`
	RollingUpdateMinInstancesInService *int           `yaml:"rollingUpdateMinInstancesInService,omitempty"`
	MixedInstances                     MixedInstances `yaml:"mixedInstances,omitempty"`
	UnknownKeys                        `yaml:",inline"`
}

Configuration specific to auto scaling groups

func (AutoScalingGroup) Validate

func (asg AutoScalingGroup) Validate() error

type AwsEnvironment

type AwsEnvironment struct {
	Enabled     bool              `yaml:"enabled"`
	Environment map[string]string `yaml:"environment"`
}

type AwsNodeLabels

type AwsNodeLabels struct {
	Enabled bool `yaml:"enabled"`
}

type BashPrompt

type BashPrompt struct {
	Enabled           bool        `yaml:"enabled,omitempty"`
	IncludePWD        bool        `yaml:"include-pwd,omitempty"`
	IncludeHostname   bool        `yaml:"include-hostname,omitempty"`
	IncludeUser       bool        `yaml:"include-user,omitempty"`
	ClusterColour     ShellColour `yaml:"cluster-colour,omitempty"`
	Divider           string      `yaml:"divider,omitempty"`
	DividerColour     ShellColour `yaml:"divider-colour,omitempty"`
	EtcdLabel         string      `yaml:"etcd-label,omitempty"`
	EtcdColour        ShellColour `yaml:"etcd-colour,omitempty"`
	ControllerLabel   string      `yaml:"controller-label,omitempty"`
	ControllerColour  ShellColour `yaml:"controller-colour,omitempty"`
	WorkerLabel       string      `yaml:"worker-label,omitempty"`
	WorkerColour      ShellColour `yaml:"worker-colour,omitempty"`
	RootUserColour    ShellColour `yaml:"root-user-colour,omitempty"`
	NonRootUserColour ShellColour `yaml:"non-root-user-colour,omitempty"`
	DirectoryColour   ShellColour `yaml:"directory-colour,omitempty"`
}

func NewDefaultBashPrompt

func NewDefaultBashPrompt() BashPrompt

type CIDRRange

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

func (c CIDRRange) String() string

String returns the string representation of this CIDR range

func (*CIDRRange) UnmarshalYAML

func (c *CIDRRange) UnmarshalYAML(unmarshal func(interface{}) error) error

type CIDRRanges

type CIDRRanges []CIDRRange

CIDRRanges represents IP network ranges in CIDR notation

func DefaultCIDRRanges

func DefaultCIDRRanges() CIDRRanges

type CalicoConfig added in v0.16.2

type CalicoConfig struct {
	VxlanMode bool `yaml:"vxlanMode"`
}

type CloudControllerManager added in v0.15.1

type CloudControllerManager struct {
	Enabled bool `yaml:"enabled"`
}

type CloudFormation

type CloudFormation struct {
	RoleARN            string             `yaml:"roleARN,omitempty"`
	StackNameOverrides StackNameOverrides `yaml:"stackNameOverrides,omitempty"`
}

type CloudFormationSpec

type CloudFormationSpec struct {
	Stacks `yaml:"stacks,omitempty"`
}

CloudFormation represents customizations to CloudFormation-related settings and configurations

type CloudWatchLogging

type CloudWatchLogging struct {
	Enabled         bool `yaml:"enabled"`
	RetentionInDays int  `yaml:"retentionInDays"`
	LocalStreaming  `yaml:"localStreaming"`
}

func (*CloudWatchLogging) MergeIfEmpty

func (c *CloudWatchLogging) MergeIfEmpty(other CloudWatchLogging)

type Cluster

type Cluster struct {
	KubeClusterSettings   `yaml:",inline"`
	DeploymentSettings    `yaml:",inline"`
	DefaultWorkerSettings `yaml:",inline"`
	Controller            Controller `yaml:"controller,omitempty"`
	EtcdSettings          `yaml:",inline"`
	AdminAPIEndpointName  string `yaml:"adminAPIEndpointName,omitempty"`
	RecordSetTTL          int    `yaml:"recordSetTTL,omitempty"`
	TLSCADurationDays     int    `yaml:"tlsCADurationDays,omitempty"`
	TLSCertDurationDays   int    `yaml:"tlsCertDurationDays,omitempty"`
	HostedZoneID          string `yaml:"hostedZoneId,omitempty"`
	Worker                `yaml:"worker"`
	PluginConfigs         PluginConfigs `yaml:"kubeAwsPlugins,omitempty"`
	// SSHAccessAllowedSourceCIDRs is network ranges of sources you'd like SSH accesses to be allowed from, in CIDR notation
	SSHAccessAllowedSourceCIDRs CIDRRanges              `yaml:"sshAccessAllowedSourceCIDRs,omitempty"`
	CustomApiServerSettings     CustomApiServerSettings `yaml:"customApiServerSettings,omitempty"`
	CustomSettings              map[string]interface{}  `yaml:"customSettings,omitempty"`
	KubeResourcesAutosave       `yaml:"kubeResourcesAutosave,omitempty"`
	OpenICMP                    bool `yaml:"openICMP,omitempty"`
}

Cluster is the container of all the configurable parameters of a kube-aws cluster, customizable via cluster.yaml

func NewDefaultCluster

func NewDefaultCluster() *Cluster

func (Cluster) APIAccessAllowedSourceCIDRsForControllerSG

func (c Cluster) APIAccessAllowedSourceCIDRsForControllerSG() []string

APIAccessAllowedSourceCIDRsForControllerSG returns all the CIDRs of Kubernetes API endpoints that controller nodes must allow access from

func (*Cluster) AvailabilityZones

func (c *Cluster) AvailabilityZones() []string

Returns the availability zones referenced by the cluster configuration

func (*Cluster) ConsumeDeprecatedKeys

func (c *Cluster) ConsumeDeprecatedKeys()

func (Cluster) ControlPlaneStackName

func (c Cluster) ControlPlaneStackName() string

func (*Cluster) ControllerFeatureGates

func (c *Cluster) ControllerFeatureGates() FeatureGates

func (Cluster) EtcdIndexEnvVarName

func (c Cluster) EtcdIndexEnvVarName() string

func (Cluster) EtcdNodeEnvFileName

func (c Cluster) EtcdNodeEnvFileName() string

func (Cluster) ExternalDNSNames

func (c Cluster) ExternalDNSNames() []string

ExternalDNSNames returns all the DNS names of Kubernetes API endpoints should be covered in the TLS cert for k8s API

func (*Cluster) Load

func (c *Cluster) Load() error

func (Cluster) NodeLabels

func (c Cluster) NodeLabels() NodeLabels

func (*Cluster) SetDefaults

func (c *Cluster) SetDefaults() error

func (Cluster) StackNameEnvFileName

func (c Cluster) StackNameEnvFileName() string

func (Cluster) StackNameEnvVarName

func (c Cluster) StackNameEnvVarName() string

func (*Cluster) ValidateExistingVPC

func (c *Cluster) ValidateExistingVPC(existingVPCCIDR string, existingSubnetCIDRS []string) error

Validates the an existing VPC and it's existing subnets do not conflict with this cluster configuration

type ClusterOptions

type ClusterOptions struct {
	S3URI    string
	SkipWait bool
}

type ClusterSpec

type ClusterSpec struct {
	// Values represents the values available in templates
	Values `yaml:"values,omitempty"`
	// CloudFormation represents customizations to CloudFormation-related settings and configurations
	CloudFormation CloudFormationSpec `yaml:"cloudformation,omitempty"`
	// Helm represents what are injected into the resulting K8S cluster via Helm - a package manager for K8S
	Helm `yaml:"helm,omitempty"`
	// Kubernetes represents what are injected into the resulting K8S
	Kubernetes Kubernetes `yaml:"kubernetes,omitempty"`
	// Machine represents what are injected into each machines managed by kube-aws
	Machine `yaml:"machine,omitempty"`
	// PKI extends the cluster PKI managed by kube-aws
	PKI `yaml:"pki,omitempty"`
}

Cluster is the configuration part of a plugin which is used to append arbitrary configs into various resources managed by kube-aws

type CommandLineFlag

type CommandLineFlag struct {
	// Name is the name of a command-line flag passed to the k8s apiserver.
	// For example, a name 	is "oidc-issuer-url" for the flag `--oidc-issuer-url`.
	Name string `yaml:"name,omitempty"`
	// Value is a golang text template resulting to the value of a command-line flag passed to the k8s apiserver
	Value string `yaml:"value,omitempty"`
}

type CommandLineFlags

type CommandLineFlags []CommandLineFlag

type ComputeResources

type ComputeResources struct {
	Requests ResourceQuota `yaml:"requests,omitempty"`
	Limits   ResourceQuota `yaml:"limits,omitempty"`
}

type ComputedDeploymentSettings

type ComputedDeploymentSettings struct {
	AMI string
}

Part of configuration which can't be provided via user input but is computed from user input

type ContainerStorageInterface added in v0.15.1

type ContainerStorageInterface struct {
	Enabled                bool  `yaml:"enabled"`
	Debug                  bool  `yaml:"debug"`
	CSIProvisioner         Image `yaml:"csiProvisioner"`
	CSIAttacher            Image `yaml:"csiAttacher"`
	CSILivenessProbe       Image `yaml:"csiLivenessProbe"`
	CSINodeDriverRegistrar Image `yaml:"csiNodeDriverRegistrar"`
	AmazonEBSDriver        Image `yaml:"amazonEBSDriver"`
}

type ContainerVolumeMount

type ContainerVolumeMount string

func (ContainerVolumeMount) MountDockerRW added in v0.16.0

func (m ContainerVolumeMount) MountDockerRW() string

func (ContainerVolumeMount) ToRktRunArgs

func (m ContainerVolumeMount) ToRktRunArgs() []string

type Contents

type Contents struct {
	provisioner.RemoteFileSpec `yaml:",inline"`
	// TODO Better naming
	UnknownKeys map[string]interface{} `yaml:",inline"`
}

type Controller

type Controller struct {
	AutoScalingGroup   AutoScalingGroup `yaml:"autoScalingGroup,omitempty"`
	EC2Instance        `yaml:",inline"`
	LoadBalancer       ControllerElb       `yaml:"loadBalancer,omitempty"`
	IAMConfig          IAMConfig           `yaml:"iam,omitempty"`
	SecurityGroupIds   []string            `yaml:"securityGroupIds"`
	VolumeMounts       []NodeVolumeMount   `yaml:"volumeMounts,omitempty"`
	Subnets            Subnets             `yaml:"subnets,omitempty"`
	CustomFiles        []CustomFile        `yaml:"customFiles,omitempty"`
	CustomSystemdUnits []CustomSystemdUnit `yaml:"customSystemdUnits,omitempty"`
	NodeSettings       `yaml:",inline"`
	UnknownKeys        `yaml:",inline"`
}

TODO Merge this with WorkerNodePool

func NewDefaultController

func NewDefaultController() Controller

func (Controller) ControllerRollingUpdateMinInstancesInService

func (c Controller) ControllerRollingUpdateMinInstancesInService() int

func (Controller) InstanceProfileRole

func (c Controller) InstanceProfileRole() string

func (Controller) InstanceProfileRoles

func (c Controller) InstanceProfileRoles() string

func (Controller) LaunchConfigurationLogicalName

func (c Controller) LaunchConfigurationLogicalName() string

func (Controller) LogicalName

func (c Controller) LogicalName() string

func (Controller) MaxControllerCount

func (c Controller) MaxControllerCount() int

func (Controller) MinControllerCount

func (c Controller) MinControllerCount() int

func (Controller) SecurityGroupRefs

func (c Controller) SecurityGroupRefs() []string

func (Controller) Validate

func (c Controller) Validate() error

type ControllerElb

type ControllerElb struct {
	Private bool
	Subnets Subnets
}

type ControllerManager

type ControllerManager struct {
	ComputeResources ComputeResources `yaml:"resources,omitempty"`
	Flags            CommandLineFlags `yaml:"flags,omitempty"`
}

type CoreDNSLocal added in v0.14.7

type CoreDNSLocal struct {
	Enabled          bool             `yaml:"enabled"`
	ComputeResources ComputeResources `yaml:"resources,omitempty"`
}

type CustomApiServerSettings

type CustomApiServerSettings struct {
	AdditionalDnsSANs     []string `yaml:"additionalDnsSans,omitempty"`
	AdditionalIPAddresses []string `yaml:"additionalIPAddressSans,omitempty"`
}

type CustomFile

type CustomFile struct {
	Path        string `yaml:"path"`
	Permissions uint   `yaml:"permissions"`
	Content     string `yaml:"content,omitempty"`
	Template    string `yaml:"template,omitempty"`
	Type        string `yaml:"type,omitempty"`
	UnknownKeys `yaml:",inline"`
}

func (CustomFile) Encrypted

func (c CustomFile) Encrypted() bool

func (CustomFile) GzippedBase64Content

func (c CustomFile) GzippedBase64Content() string

func (CustomFile) PermissionsString

func (c CustomFile) PermissionsString() string

func (CustomFile) RenderContent

func (c CustomFile) RenderContent(ctx interface{}) (string, error)

func (CustomFile) RenderGzippedBase64Content

func (c CustomFile) RenderGzippedBase64Content(ctx interface{}) (string, error)

type CustomSystemdUnit

type CustomSystemdUnit struct {
	Name        string                    `yaml:"name"`
	Command     string                    `yaml:"command,omitempty"`
	Content     string                    `yaml:"content,omitempty"`
	Enable      bool                      `yaml:"enable,omitempty"`
	Runtime     bool                      `yaml:"runtime,omitempty"`
	DropIns     []CustomSystemdUnitDropIn `yaml:"drop-ins,omitempty"`
	UnknownKeys `yaml:",inline"`
}

func (CustomSystemdUnit) ContentArray

func (c CustomSystemdUnit) ContentArray() []string

func (CustomSystemdUnit) ContentPresent

func (c CustomSystemdUnit) ContentPresent() bool

func (CustomSystemdUnit) DropInsPresent

func (c CustomSystemdUnit) DropInsPresent() bool

func (CustomSystemdUnit) EnableString

func (c CustomSystemdUnit) EnableString() string

func (CustomSystemdUnit) RuntimeString

func (c CustomSystemdUnit) RuntimeString() string

type CustomSystemdUnitDropIn

type CustomSystemdUnitDropIn struct {
	Name    string `yaml:"name"`
	Content string `yaml:"content"`
}

func (CustomSystemdUnitDropIn) ContentArray

func (c CustomSystemdUnitDropIn) ContentArray() []string

type DNSMasq added in v0.14.7

type DNSMasq struct {
	CoreDNSLocal  CoreDNSLocal `yaml:"coreDNSLocal"`
	CacheSize     int          `yaml:"cacheSize"`
	DNSForwardMax int          `yaml:"dnsForwardMax"`
	NegTTL        int          `yaml:"negTTL"`
}

type DataVolume

type DataVolume struct {
	Size        int    `yaml:"size,omitempty"`
	Type        string `yaml:"type,omitempty"`
	IOPS        int    `yaml:"iops,omitempty"`
	Ephemeral   bool   `yaml:"ephemeral,omitempty"`
	Encrypted   bool   `yaml:"encrypted,omitempty"`
	UnknownKeys `yaml:",inline"`
}

type DefaultWorkerSettings

type DefaultWorkerSettings struct {
	WorkerCreateTimeout    string   `yaml:"workerCreateTimeout,omitempty"`
	WorkerInstanceType     string   `yaml:"workerInstanceType,omitempty"`
	WorkerRootVolumeType   string   `yaml:"workerRootVolumeType,omitempty"`
	WorkerRootVolumeIOPS   int      `yaml:"workerRootVolumeIOPS,omitempty"`
	WorkerRootVolumeSize   int      `yaml:"workerRootVolumeSize,omitempty"`
	WorkerSpotPrice        string   `yaml:"workerSpotPrice,omitempty"`
	WorkerSecurityGroupIds []string `yaml:"workerSecurityGroupIds,omitempty"`
	WorkerTenancy          string   `yaml:"workerTenancy,omitempty"`
	WorkerTopologyPrivate  bool     `yaml:"workerTopologyPrivate,omitempty"`
}

Part of configuration which is specific to worker nodes

func (DefaultWorkerSettings) Validate

func (c DefaultWorkerSettings) Validate() error

type DeploymentSettings

type DeploymentSettings struct {
	ComputedDeploymentSettings
	CloudFormation                        CloudFormation  `yaml:"cloudformation,omitempty"`
	ClusterName                           string          `yaml:"clusterName,omitempty"`
	S3URI                                 string          `yaml:"s3URI,omitempty"`
	DisableContainerLinuxAutomaticUpdates bool            `yaml:"disableContainerLinuxAutomaticUpdates,omitempty"`
	KeyName                               string          `yaml:"keyName,omitempty"`
	Region                                Region          `yaml:",inline"`
	AvailabilityZone                      string          `yaml:"availabilityZone,omitempty"`
	ReleaseChannel                        string          `yaml:"releaseChannel,omitempty"`
	AmiId                                 string          `yaml:"amiId,omitempty"`
	DeprecatedVPCID                       string          `yaml:"vpcId,omitempty"`
	VPC                                   VPC             `yaml:"vpc,omitempty"`
	DeprecatedInternetGatewayID           string          `yaml:"internetGatewayId,omitempty"`
	InternetGateway                       InternetGateway `yaml:"internetGateway,omitempty"`
	// Required for validations like e.g. if instance cidr is contained in vpc cidr
	VPCCIDR                   string `yaml:"vpcCIDR,omitempty"`
	InstanceCIDR              string `yaml:"instanceCIDR,omitempty"`
	K8sVer                    string `yaml:"kubernetesVersion,omitempty"`
	KubeAWSVersion            string
	ContainerRuntime          string            `yaml:"containerRuntime,omitempty"`
	KMSKeyARN                 string            `yaml:"kmsKeyArn,omitempty"`
	StackTags                 map[string]string `yaml:"stackTags,omitempty"`
	Subnets                   Subnets           `yaml:"subnets,omitempty"`
	EIPAllocationIDs          []string          `yaml:"eipAllocationIDs,omitempty"`
	ElasticFileSystemID       string            `yaml:"elasticFileSystemId,omitempty"`
	SharedPersistentVolume    bool              `yaml:"sharedPersistentVolume,omitempty"`
	SSHAuthorizedKeys         []string          `yaml:"sshAuthorizedKeys,omitempty"`
	Addons                    Addons            `yaml:"addons"`
	Experimental              Experimental      `yaml:"experimental"`
	Kubelet                   Kubelet           `yaml:"kubelet"`
	ManageCertificates        bool              `yaml:"manageCertificates,omitempty"`
	WaitSignal                WaitSignal        `yaml:"waitSignal"`
	CloudWatchLogging         `yaml:"cloudWatchLogging,omitempty"`
	AmazonSsmAgent            `yaml:"amazonSsmAgent,omitempty"`
	CloudFormationStreaming   bool `yaml:"cloudFormationStreaming,omitempty"`
	KubeProxy                 `yaml:"kubeProxy,omitempty"`
	KubeDns                   `yaml:"kubeDns,omitempty"`
	KubeSystemNamespaceLabels map[string]string `yaml:"kubeSystemNamespaceLabels,omitempty"`
	// Images repository
	HyperkubeImage                     Image      `yaml:"hyperkubeImage,omitempty"`
	AWSCliImage                        Image      `yaml:"awsCliImage,omitempty"`
	ClusterProportionalAutoscalerImage Image      `yaml:"clusterProportionalAutoscalerImage,omitempty"`
	CoreDnsImage                       Image      `yaml:"coreDnsImage,omitempty"`
	KubeDnsImage                       Image      `yaml:"kubeDnsImage,omitempty"`
	KubeDnsMasqImage                   Image      `yaml:"kubeDnsMasqImage,omitempty"`
	KubeReschedulerImage               Image      `yaml:"kubeReschedulerImage,omitempty"`
	DnsMasqMetricsImage                Image      `yaml:"dnsMasqMetricsImage,omitempty"`
	ExecHealthzImage                   Image      `yaml:"execHealthzImage,omitempty"`
	HelmImage                          Image      `yaml:"helmImage,omitempty"`
	TillerImage                        Image      `yaml:"tillerImage,omitempty"`
	MetricsServerImage                 Image      `yaml:"metricsServerImage,omitempty"`
	AddonResizerImage                  Image      `yaml:"addonResizerImage,omitempty"`
	PauseImage                         Image      `yaml:"pauseImage,omitempty"`
	JournaldCloudWatchLogsImage        Image      `yaml:"journaldCloudWatchLogsImage,omitempty"`
	Kubernetes                         Kubernetes `yaml:"kubernetes,omitempty"`
	HostOS                             HostOS     `yaml:"hostOS,omitempty"`
}

Part of configuration which can be customized for each type/group of nodes(etcd/controller/worker/) by its nature.

Please beware that it is described as just "by its nature". Whether it can actually be customized or not depends on you use node pools or not. If you've chosen to create a single cluster including all the worker, controller, etcd nodes within a single cfn stack, you can't customize per group of nodes. If you've chosen to create e.g. a separate node pool for each type of worker nodes, you can customize per node pool.

Though it is highly configurable, it's basically users' responsibility to provide `correct` values if they're going beyond the defaults.

func (DeploymentSettings) AllSubnets

func (s DeploymentSettings) AllSubnets() Subnets

func (DeploymentSettings) ApiServerLeaseEndpointReconciler

func (c DeploymentSettings) ApiServerLeaseEndpointReconciler() (bool, error)

func (DeploymentSettings) AssetsEncryptionEnabled

func (c DeploymentSettings) AssetsEncryptionEnabled() bool

func (DeploymentSettings) FindNATGatewayForPrivateSubnet

func (c DeploymentSettings) FindNATGatewayForPrivateSubnet(s Subnet) (*NATGateway, error)

func (DeploymentSettings) FindSubnetMatching

func (c DeploymentSettings) FindSubnetMatching(condition Subnet) Subnet

func (DeploymentSettings) NATGateways

func (c DeploymentSettings) NATGateways() []NATGateway

func (DeploymentSettings) PrivateSubnets

func (c DeploymentSettings) PrivateSubnets() Subnets

func (DeploymentSettings) PublicSubnets

func (c DeploymentSettings) PublicSubnets() Subnets

func (DeploymentSettings) Validate

func (DeploymentSettings) ValidateNodePool

func (s DeploymentSettings) ValidateNodePool(name string) error

func (DeploymentSettings) WithDefaultsFrom

func (c DeploymentSettings) WithDefaultsFrom(main DeploymentSettings) DeploymentSettings

TODO make this less smelly by e.g. moving this to core/nodepool/config

type DeploymentValidationResult

type DeploymentValidationResult struct {
	// contains filtered or unexported fields
}

type EC2Instance

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"`
	InstanceTags  map[string]string `yaml:"instanceTags,omitempty"`
}

func (EC2Instance) HasNvmeDevices

func (e EC2Instance) HasNvmeDevices() bool

This function is used when rendering cloud-config-worker

type EncryptionAtRest

type EncryptionAtRest struct {
	Enabled bool `yaml:"enabled"`
}

type EphemeralImageStorage

type EphemeralImageStorage struct {
	Enabled    bool   `yaml:"enabled"`
	Disk       string `yaml:"disk"`
	Filesystem string `yaml:"filesystem"`
}

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"`
	VolumeMounts       []NodeVolumeMount    `yaml:"volumeMounts,omitempty"`
	EC2Instance        `yaml:",inline"`
	UserSuppliedArgs   UserSuppliedArgs `yaml:"userSuppliedArgs,omitempty"`
	IAMConfig          IAMConfig        `yaml:"iam,omitempty"`
	Nodes              []EtcdNode       `yaml:"nodes,omitempty"`
	SecurityGroupIds   []string         `yaml:"securityGroupIds"`
	Snapshot           EtcdSnapshot     `yaml:"snapshot,omitempty"`
	Subnets            Subnets          `yaml:"subnets,omitempty"`
	StackExists        bool
	UnknownKeys        `yaml:",inline"`
}

func NewDefaultEtcd

func NewDefaultEtcd() Etcd

func (Etcd) AdvertisedFQDNTagKey

func (e Etcd) AdvertisedFQDNTagKey() string

AdvertisedFQDNTagKey returns the key of the tag used to identify the advertised hostname of the etcd member of an EBS volume

func (Etcd) EIPAllocationIDTagKey

func (e Etcd) EIPAllocationIDTagKey() string

EIPAllocationIDTagKey returns the key of the tag used to identify the EIP for the etcd member of an EBS volume

func (Etcd) FormatOpts

func (e Etcd) FormatOpts() string

func (Etcd) HostedZoneLogicalName

func (e Etcd) HostedZoneLogicalName() (string, error)

func (Etcd) HostedZoneManaged

func (e Etcd) HostedZoneManaged() bool

func (Etcd) HostedZoneRef

func (e Etcd) HostedZoneRef() (string, error)

func (Etcd) InternalDomainName

func (e Etcd) InternalDomainName() (string, error)

func (Etcd) KMSKeyARN

func (e Etcd) KMSKeyARN() string

func (Etcd) LogicalName

func (e Etcd) LogicalName() string

func (Etcd) NameTagKey

func (e Etcd) NameTagKey() string

NameTagKey returns the key of the tag used to identify the name of the etcd member of an EBS volume

func (Etcd) NetworkInterfaceDeviceIndex

func (e Etcd) NetworkInterfaceDeviceIndex() int

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

func (e Etcd) NetworkInterfaceIDTagKey() string

NetworkInterfaceIDTagKey returns the key of the tag used to identify the ENI for the etcd member of an EBS volume

func (Etcd) NodeShouldHaveEIP

func (e Etcd) NodeShouldHaveEIP() bool

func (Etcd) NodeShouldHaveSecondaryENI

func (e Etcd) NodeShouldHaveSecondaryENI() bool

func (Etcd) SecurityGroupRefs

func (e Etcd) SecurityGroupRefs() []string

func (Etcd) Validate

func (e Etcd) Validate() error

func (Etcd) Version

func (e Etcd) Version() string

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                string     `yaml:"version,omitempty"`
}

func (EtcdCluster) EC2InternalDomainUsed

func (c EtcdCluster) EC2InternalDomainUsed() bool

func (EtcdCluster) GetMemberIdentityProvider

func (c EtcdCluster) GetMemberIdentityProvider() string

func (EtcdCluster) LogicalName added in v0.15.0

func (c EtcdCluster) LogicalName() string

func (EtcdCluster) MajorMinorVersion added in v0.15.0

func (c EtcdCluster) MajorMinorVersion() 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

type EtcdDisasterRecovery struct {
	Automated bool `yaml:"automated,omitempty"`
}

type EtcdExistingState

type EtcdExistingState struct {
	StackExists                    bool
	EtcdMigrationEnabled           bool
	EtcdMigrationExistingEndpoints string
}

ExistingState describes the existing state of the etcd cluster

type EtcdNode

type EtcdNode struct {
	Name string `yaml:"name,omitempty"`
	FQDN string `yaml:"fqdn,omitempty"`
}

type EtcdSettings

type EtcdSettings struct {
	Etcd `yaml:"etcd,omitempty"`
}

Part of configuration which is specific to etcd nodes

func (EtcdSettings) Validate

func (e EtcdSettings) Validate() error

Valid returns an error when there's any user error in the `etcd` settings

type EtcdSnapshot

type EtcdSnapshot struct {
	Automated bool `yaml:"automated,omitempty"`
}

type EventRateLimit

type EventRateLimit struct {
	Enabled bool   `yaml:"enabled"`
	Limits  string `yaml:"limits"`
}

type Experimental

type Experimental struct {
	Admission                        Admission                 `yaml:"admission"`
	AuditLog                         AuditLog                  `yaml:"auditLog"`
	Authentication                   Authentication            `yaml:"authentication"`
	AwsEnvironment                   AwsEnvironment            `yaml:"awsEnvironment"`
	AwsNodeLabels                    AwsNodeLabels             `yaml:"awsNodeLabels"`
	EphemeralImageStorage            EphemeralImageStorage     `yaml:"ephemeralImageStorage"`
	GpuSupport                       GpuSupport                `yaml:"gpuSupport,omitempty"`
	KubeletOpts                      string                    `yaml:"kubeletOpts,omitempty"`
	LoadBalancer                     LoadBalancer              `yaml:"loadBalancer"`
	TargetGroup                      TargetGroup               `yaml:"targetGroup"`
	NodeDrainer                      NodeDrainer               `yaml:"nodeDrainer"`
	Oidc                             Oidc                      `yaml:"oidc"`
	DisableSecurityGroupIngress      bool                      `yaml:"disableSecurityGroupIngress"`
	NodeMonitorGracePeriod           string                    `yaml:"nodeMonitorGracePeriod"`
	SkipIOPerformanceEtcdVolumeCheck bool                      `yaml:"skipIOPerformanceEtcdVolumeCheck"`
	CloudControllerManager           CloudControllerManager    `yaml:"cloudControllerManager"`
	ContainerStorageInterface        ContainerStorageInterface `yaml:"containerStorageInterface"`
	UnknownKeys                      `yaml:",inline"`
}

func (Experimental) Validate

func (c Experimental) Validate(name string) error

type FeatureGates

type FeatureGates map[string]string

func (FeatureGates) Enabled

func (l FeatureGates) Enabled() bool

func (FeatureGates) String

func (l FeatureGates) String() string

Returns key=value pairs separated by ',' to be passed to kubelet's `--feature-gates` flag

func (FeatureGates) Yaml

func (l FeatureGates) Yaml() (string, error)

Convert the map[string]string FeatureGates to a map[string]bool yaml representation

type Files

type FlannelConfig added in v0.16.0

type FlannelConfig struct {
	SubnetLen int32 `yaml:"subnetLen"`
}

type Gpu

type Gpu struct {
	Nvidia NvidiaSetting `yaml:"nvidia"`
}

func (Gpu) Validate

func (c Gpu) Validate(instanceType string, experimentalGpuSupportEnabled bool) error

type GpuSupport

type GpuSupport struct {
	Enabled      bool   `yaml:"enabled"`
	Version      string `yaml:"version"`
	InstallImage string `yaml:"installImage"`
}

type Helm

type Helm struct {
	// Releases is a list of helm releases to be maintained on the cluster.
	// Note that the list is sorted by their names by kube-aws so that it won't result in unnecessarily node replacements.
	Releases HelmReleases `yaml:"releases,omitempty"`
}

type HelmRelease

type HelmRelease struct {
	Name    string `yaml:"name,omitempty"`
	Chart   string `yaml:"chart,omitempty"`
	Version string `yaml:"version,omitempty"`
	Values  Values `yaml:"values,omitempty"`
}

type HelmReleaseFileset

type HelmReleaseFileset struct {
	ValuesFile  *provisioner.RemoteFile
	ReleaseFile *provisioner.RemoteFile
}

type HelmReleases

type HelmReleases []HelmRelease
func (k *Helm) UnmarshalYAML(unmarshal func(interface{}) error) error {
	type t Helm
	work := t(Helm{
		Releases: HelmReleases{},
	})
	if err := unmarshal(&work); err != nil {
		return fmt.Errorf("failed to parse helm plugin config: %v", err)
	}
	*k = Helm(work)

	return nil
}

type HostOS

type HostOS struct {
	BashPrompt BashPrompt `yaml:"bashPrompt,omitempty"`
	MOTDBanner MOTDBanner `yaml:"motdBanner,omitempty"`
}

type HostedZone

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 IAM

type IAM struct {
	Policy IAMPolicy `yaml:"policy,omitempty"`
}

type IAMConfig

type IAMConfig struct {
	Role            IAMRole            `yaml:"role,omitempty"`
	InstanceProfile IAMInstanceProfile `yaml:"instanceProfile,omitempty"`
	UnknownKeys     `yaml:",inline"`
	Policy          IAMPolicy
}

func (IAMConfig) Validate

func (c IAMConfig) Validate() error

type IAMInstanceProfile

type IAMInstanceProfile struct {
	ARN `yaml:",inline"`
}

type IAMManagedPolicy

type IAMManagedPolicy struct {
	ARN `yaml:",inline"`
}

type IAMPolicy

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

type IAMPolicyStatement struct {
	Actions   []string `yaml:"actions,omitempty"`
	Effect    string   `yaml:"effect,omitempty"`
	Resources []string `yaml:"resources,omitempty"`
}

type IAMPolicyStatements

type IAMPolicyStatements []IAMPolicyStatement

type IAMRole

type IAMRole struct {
	ARN              `yaml:",inline"`
	Name             string             `yaml:"name,omitempty"`
	StrictName       bool               `yaml:"strictName,omitempty"`
	ManageExternally bool               `yaml:"manageExternally,omitempty"`
	ManagedPolicies  []IAMManagedPolicy `yaml:"managedPolicies,omitempty"`
}

type IPVSMode

type IPVSMode struct {
	Enabled       bool   `yaml:"enabled"`
	Scheduler     string `yaml:"scheduler"`
	SyncPeriod    string `yaml:"syncPeriod"`
	MinSyncPeriod string `yaml:"minSyncPeriod"`
}

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 (i *Image) MergeIfEmpty(other Image)

func (*Image) Options

func (i *Image) Options() string

func (*Image) RepoWithTag

func (i *Image) RepoWithTag() string

func (*Image) RktRepo

func (i *Image) RktRepo() string

func (*Image) RktRepoWithoutTag

func (i *Image) RktRepoWithoutTag() string

type InfrastructureValidationResult

type InfrastructureValidationResult struct {
	// contains filtered or unexported fields
}

type InternetGateway

type InternetGateway struct {
	Identifier `yaml:",inline"`
}

func (InternetGateway) ManageInternetGateway

func (g InternetGateway) ManageInternetGateway() bool

type KeyPairSpec

type KeyPairSpec struct {
	Name         string        `yaml:"name"`
	CommonName   string        `yaml:"commonName"`
	Organization string        `yaml:"organization"`
	Duration     time.Duration `yaml:"duration"`
	DNSNames     []string      `yaml:"dnsNames"`
	IPAddresses  []string      `yaml:"ipAddresses"`
	Usages       []string      `yaml:"usages"`
	// Signer is the name of the keypair for the private key used to sign the cert
	Signer string `yaml:"signer"`
}

func (KeyPairSpec) CertPath

func (spec KeyPairSpec) CertPath() string

func (KeyPairSpec) EncryptedKeyPath

func (spec KeyPairSpec) EncryptedKeyPath() string

func (KeyPairSpec) KeyPath

func (spec KeyPairSpec) KeyPath() string

func (KeyPairSpec) SignerCertPath added in v0.15.0

func (spec KeyPairSpec) SignerCertPath() string

func (KeyPairSpec) SignerKeyPath added in v0.15.0

func (spec KeyPairSpec) SignerKeyPath() string

type KubeApiServer added in v0.13.2

type KubeApiServer struct {
	ComputeResources ComputeResources `yaml:"resources,omitempty"`
	TargetRamMb      int              `yaml:"targetRamMb,omitempty"`
}

type KubeClusterSettings

type KubeClusterSettings struct {
	APIEndpointConfigs APIEndpoints `yaml:"apiEndpoints,omitempty"`
	// Required by kubelet to locate the kube-apiserver
	ExternalDNSName string `yaml:"externalDNSName,omitempty"`
	// Required by kubelet to locate the cluster-internal dns hosted on controller nodes in the base cluster
	DNSServiceIP string `yaml:"dnsServiceIP,omitempty"`
	PodCIDR      string `yaml:"podCIDR,omitempty"`
	ServiceCIDR  string `yaml:"serviceCIDR,omitempty"`
}

Part of configuration which is shared between controller nodes and worker nodes. Its name is prefixed with `Kube` because it doesn't relate to etcd.

func (KubeClusterSettings) K8sNetworkPlugin

func (c KubeClusterSettings) K8sNetworkPlugin() string

Required by kubelet to use the consistent network plugin with the base cluster

func (KubeClusterSettings) Validate

type KubeDns

type KubeDns struct {
	Provider                     string            `yaml:"provider"`
	NodeLocalResolver            bool              `yaml:"nodeLocalResolver"`
	NodeLocalResolverOptions     []string          `yaml:"nodeLocalResolverOptions"`
	DNSMasq                      DNSMasq           `yaml:"dnsmasq"`
	DeployToControllers          bool              `yaml:"deployToControllers"`
	AntiAffinityAvailabilityZone bool              `yaml:"antiAffinityAvailabilityZone"`
	TTL                          int               `yaml:"ttl"`
	Autoscaler                   KubeDnsAutoscaler `yaml:"autoscaler"`
	DnsDeploymentResources       ComputeResources  `yaml:"dnsDeploymentResources,omitempty"`
	ExtraCoreDNSConfig           string            `yaml:"extraCoreDNSConfig"`
	AdditionalZoneCoreDNSConfig  string            `yaml:"additionalZoneCoreDNSConfig"`
}

func (*KubeDns) MergeIfEmpty

func (c *KubeDns) MergeIfEmpty(other KubeDns)

type KubeDnsAutoscaler

type KubeDnsAutoscaler struct {
	CoresPerReplica int `yaml:"coresPerReplica"`
	NodesPerReplica int `yaml:"nodesPerReplica"`
	Min             int `yaml:"min"`
}

type KubeProxy

type KubeProxy struct {
	IPVSMode         IPVSMode               `yaml:"ipvsMode"`
	ComputeResources ComputeResources       `yaml:"resources,omitempty"`
	Config           map[string]interface{} `yaml:"config,omitempty"`
}

type KubeResourcesAutosave

type KubeResourcesAutosave struct {
	Enabled bool `yaml:"enabled"`
	S3Path  string
}

type KubeScheduler

type KubeScheduler struct {
	ComputeResources ComputeResources `yaml:"resources,omitempty"`
	Flags            CommandLineFlags `yaml:"flags,omitempty"`
}

type Kubelet

type Kubelet struct {
	SystemReservedResources string                 `yaml:"systemReserved,omitempty"`
	KubeReservedResources   string                 `yaml:"kubeReserved,omitempty"`
	Kubeconfig              string                 `yaml:"kubeconfig,omitempty"`
	Mounts                  []ContainerVolumeMount `yaml:"mounts,omitempty"`
	Flags                   CommandLineFlags       `yaml:"flags,omitempty"`
}

Kubelet options

type KubeletSpec

type KubeletSpec struct {
	FeatureGates FeatureGates           `yaml:"featureGates,omitempty"`
	NodeLabels   NodeLabels             `yaml:"nodeLabels,omitempty"`
	Kubeconfig   string                 `yaml:"kubeconfig,omitempty"`
	Mounts       []ContainerVolumeMount `yaml:"mounts,omitempty"`
}

Kubelet represents a set of customizations to kubelets running on the nodes Keys must be included in: nodeLabels, featureGates, etc kubelet can be configured per-node-pool-basic hence a part of WorkerSettings

type Kubernetes

type Kubernetes struct {
	Authentication             KubernetesAuthentication   `yaml:"authentication"`
	EncryptionAtRest           EncryptionAtRest           `yaml:"encryptionAtRest"`
	PodAutoscalerUseRestClient PodAutoscalerUseRestClient `yaml:"podAutoscalerUseRestClient"`
	Networking                 Networking                 `yaml:"networking,omitempty"`
	ControllerManager          ControllerManager          `yaml:"controllerManager,omitempty"`
	KubeScheduler              KubeScheduler              `yaml:"kubeScheduler,omitempty"`
	KubeProxy                  KubeProxy                  `yaml:"kubeProxy,omitempty"`
	KubeApiServer              KubeApiServer              `yaml:"apiServer,omitempty"`
	Kubelet                    Kubelet                    `yaml:"kubelet,omitempty"`
	APIServer                  KubernetesAPIServer        `yaml:"apiserver,omitempty"`

	// Manifests is a list of manifests to be installed to the cluster.
	// Note that the list is sorted by their names by kube-aws so that it won't result in unnecessarily node replacements.
	Manifests KubernetesManifests `yaml:"manifests,omitempty"`
}

type KubernetesAPIServer

type KubernetesAPIServer struct {
	Flags   CommandLineFlags `yaml:"flags,omitempty"`
	Volumes APIServerVolumes `yaml:"volumes,omitempty"`
}

type KubernetesAuthentication

type KubernetesAuthentication struct {
	AWSIAM AWSIAM `yaml:"awsIAM"`
}

type KubernetesManifest

type KubernetesManifest struct {
	Name                       string `yaml:"name,omitempty"`
	provisioner.RemoteFileSpec `yaml:",inline"`
}

type KubernetesManifests

type KubernetesManifests []KubernetesManifest

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

func (s *LaunchSpecification) UnmarshalYAML(unmarshal func(interface{}) error) error

func (LaunchSpecification) Validate

func (c LaunchSpecification) Validate() error

type LoadBalancer

type LoadBalancer struct {
	Enabled          bool     `yaml:"enabled"`
	Names            []string `yaml:"names"`
	SecurityGroupIds []string `yaml:"securityGroupIds"`
}

type LocalStreaming

type LocalStreaming struct {
	Enabled  bool   `yaml:"enabled"`
	Filter   string `yaml:"filter"`
	Interval int    `yaml:"interval"`
}

func (*LocalStreaming) IntervalSec

func (c *LocalStreaming) IntervalSec() int64

type MOTDBanner

type MOTDBanner struct {
	Enabled          bool        `yaml:"enabled,omitempty"`
	EtcdColour       ShellColour `yaml:"etcd-colour,omitempty"`
	KubernetesColour ShellColour `yaml:"kubernetes-colour,omitempty"`
	KubeAWSColour    ShellColour `yaml:"kube-aws-colour,omitempty"`
}

func NewDefaultMOTDBanner

func NewDefaultMOTDBanner() MOTDBanner

type Machine

type Machine struct {
	Roles MachineRoles `yaml:"roles,omitempty"`
}

type MachineRoles

type MachineRoles struct {
	Controller Node        `yaml:"controller,omitempty"`
	Etcd       MachineSpec `yaml:"etcd,omitempty"`
	Worker     Node        `yaml:"worker,omitempty"`
}

type MachineSpec

type MachineSpec struct {
	Files   `yaml:"files,omitempty"`
	IAM     `yaml:"iam,omitempty"`
	Systemd `yaml:"systemd,omitempty"`
}

type Metadata

type Metadata struct {
	Name        string `yaml:"name"`
	Version     string `yaml:"version"`
	Description string `yaml:"description"`
	// ClusterSettingsKey is the key in the root of cluster.yaml used for configuring this plugin cluster-wide
	ClusterSettingsKey string `yaml:"clusterSettingsKey,omitempty"`
	// NodePoolSettingsKey is the key in the root of a node pool settings in cluster.yaml used for configuring this plugin only for a node pool
	NodePoolSettingsKey string `yaml:"nodePoolSettingKey,omitempty"`
}

Metadata is the metadata of a kube-aws plugin consists of various settings specific to the plugin itself Metadata never affects what are injected into K8S clusters, node, other CFN resources managed by kube-aws.

func (Metadata) Validate

func (m Metadata) Validate() error

type MetricsServer

type MetricsServer struct {
	Enabled     bool `yaml:"enabled"`
	UnknownKeys `yaml:",inline"`
}

type MixedInstances

type MixedInstances struct {
	Enabled                             bool     `yaml:"enabled,omitempty"`
	OnDemandAllocationStrategy          string   `yaml:"onDemandAllocationStrategy,omitempty"`
	OnDemandBaseCapacity                int      `yaml:"onDemandBaseCapacity,omitempty"`
	OnDemandPercentageAboveBaseCapacity int      `yaml:"onDemandPercentageAboveBaseCapacity,omitempty"`
	SpotAllocationStrategy              string   `yaml:"spotAllocationStrategy,omitempty"`
	SpotInstancePools                   int      `yaml:"spotInstancePools,omitempty"`
	SpotMaxPrice                        string   `yaml:"spotMaxPrice,omitempty"`
	InstanceTypes                       []string `yaml:"instanceTypes,omitempty"`
}

func (MixedInstances) Validate

func (mi MixedInstances) 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 Networking

type Networking struct {
	AmazonVPC   AmazonVPC   `yaml:"amazonVPC,omitempty"`
	SelfHosting SelfHosting `yaml:"selfHosting,omitempty"`
}

type Node

type Node struct {
	MachineSpec `yaml:",inline"`
	Kubelet     KubeletSpec `yaml:"kubelet,omitempty"`
}

Node is a worker machine in Kubernetes

type NodeDrainer

type NodeDrainer struct {
	Enabled      bool    `yaml:"enabled"`
	DrainTimeout int     `yaml:"drainTimeout"`
	IAMRole      IAMRole `yaml:"iamRole,omitempty"`
}

func (*NodeDrainer) DrainTimeoutInSeconds

func (nd *NodeDrainer) DrainTimeoutInSeconds() int

func (*NodeDrainer) Validate

func (nd *NodeDrainer) Validate() error

type NodeLabels

type NodeLabels map[string]string

func (NodeLabels) Enabled

func (l NodeLabels) Enabled() bool

func (NodeLabels) String

func (l NodeLabels) String() string

Returns key=value pairs separated by ',' to be passed to kubelet's `--node-labels` flag

type NodeSettings

type NodeSettings struct {
	FeatureGates FeatureGates `yaml:"featureGates"`
	NodeLabels   NodeLabels   `yaml:"nodeLabels"`
	Taints       Taints       `yaml:"taints"`
}

func (NodeSettings) Validate

func (s NodeSettings) Validate() error

type NodeVolumeMount

type NodeVolumeMount struct {
	Type       string `yaml:"type,omitempty"`
	Iops       int    `yaml:"iops,omitempty"`
	Size       int    `yaml:"size,omitempty"`
	Device     string `yaml:"device,omitempty"`
	Filesystem string `yaml:"filesystem,omitempty"`
	Path       string `yaml:"path,omitempty"`
	CreateTmp  bool   `yaml:"createTmp,omitempty"`
}

func (NodeVolumeMount) FilesystemType

func (v NodeVolumeMount) FilesystemType() string

func (NodeVolumeMount) SystemdMountName

func (v NodeVolumeMount) SystemdMountName() string

func (NodeVolumeMount) Validate

func (v NodeVolumeMount) Validate() error

type NvidiaSetting

type NvidiaSetting struct {
	Enabled bool   `yaml:"enabled,omitempty"`
	Version string `yaml:"version,omitempty"`
}

func (NvidiaSetting) IsEnabledOn

func (c NvidiaSetting) IsEnabledOn(instanceType string) bool

This function is used when rendering cloud-config-worker

type Oidc

type Oidc struct {
	Enabled       bool   `yaml:"enabled"`
	IssuerUrl     string `yaml:"issuerUrl"`
	ClientId      string `yaml:"clientId"`
	UsernameClaim string `yaml:"usernameClaim"`
	GroupsClaim   string `yaml:"groupsClaim,omitempty"`
}

type Outputs

type Outputs struct {
	provisioner.RemoteFileSpec `yaml:",inline"`
}

type OwnerReferencesPermissionEnforcement

type OwnerReferencesPermissionEnforcement struct {
	Enabled bool `yaml:"enabled"`
}

type PKI

type PKI struct {
	KeyPairs []KeyPairSpec `yaml:"keypairs,omitempty"`
}

type PartDesc

type PartDesc struct {
	// contains filtered or unexported fields
}

type PersistentVolumeClaimResize

type PersistentVolumeClaimResize struct {
	Enabled bool `yaml:"enabled"`
}

type Plugin

type Plugin struct {
	Metadata `yaml:"metadata,omitempty"`
	Spec     PluginSpec `yaml:"spec,omitempty"`
}

A plugin consists of two parts: a set of metadata and a spec

func (Plugin) EnabledIn

func (p Plugin) EnabledIn(plugins PluginConfigs) (bool, *PluginConfig)

func (Plugin) SettingKey

func (p Plugin) SettingKey() string

func (Plugin) Validate

func (p Plugin) Validate() error

type PluginConfig

type PluginConfig struct {
	Enabled bool `yaml:"enabled,omitempty"`
	Values  `yaml:",inline"`
}

func (PluginConfig) Merge

type PluginConfigs

type PluginConfigs map[string]PluginConfig

func (PluginConfigs) Merge

func (PluginConfigs) PluginExists added in v0.15.0

func (pcs PluginConfigs) PluginExists(name string) bool

func (PluginConfigs) PluginIsEnabled added in v0.15.0

func (pcs PluginConfigs) PluginIsEnabled(name string) bool

type PluginSpec

type PluginSpec struct {
	// Cluster is the configuration part of a plugin which is used to append arbitrary configs into various resources managed by kube-aws
	Cluster ClusterSpec `yaml:"cluster,omitempty"`
}

PluginSpec is the specification of a kube-aws plugin A spec consists of two parts: Cluster and Command

type PodAutoscalerUseRestClient added in v0.14.5

type PodAutoscalerUseRestClient struct {
	Enabled bool `yaml:"enabled"`
}

type Prometheus

type Prometheus struct {
	SecurityGroupsEnabled bool `yaml:"securityGroupsEnabled"`
	UnknownKeys           `yaml:",inline"`
}

type Raid0Mount

type Raid0Mount struct {
	Type      string   `yaml:"type,omitempty"`
	Iops      int      `yaml:"iops,omitempty"`
	Size      int      `yaml:"size,omitempty"`
	Devices   []string `yaml:"devices,omitempty"`
	Path      string   `yaml:"path,omitempty"`
	CreateTmp bool     `yaml:"createTmp,omitempty"`
}

func (Raid0Mount) DeviceList

func (r Raid0Mount) DeviceList() string

func (Raid0Mount) NumDevices

func (r Raid0Mount) NumDevices() int

func (Raid0Mount) SystemdMountName

func (r Raid0Mount) SystemdMountName() string

func (Raid0Mount) Validate

func (r Raid0Mount) Validate() error

type Region

type Region struct {
	Name string `yaml:"region,omitempty"`
}

func RegionForName

func RegionForName(name string) Region

func (Region) IsChina

func (r Region) IsChina() bool

func (Region) IsEmpty

func (r Region) IsEmpty() bool

func (Region) IsGovcloud

func (r Region) IsGovcloud() bool

func (Region) Partition

func (r Region) Partition() string

func (Region) PrivateDomainName

func (r Region) PrivateDomainName() string

func (Region) PublicComputeDomainName

func (r Region) PublicComputeDomainName() string

func (Region) PublicDomainName

func (r Region) PublicDomainName() string

func (Region) S3Endpoint

func (r Region) S3Endpoint(bucket string) string

func (Region) String

func (r Region) String() string

func (Region) SupportsKMS

func (r Region) SupportsKMS() bool

func (Region) SupportsNetworkLoadBalancers

func (r Region) SupportsNetworkLoadBalancers() bool

type Rescheduler

type Rescheduler struct {
	Enabled     bool `yaml:"enabled"`
	UnknownKeys `yaml:",inline"`
}

type ResourceQuota

type ResourceQuota struct {
	Cpu    string `yaml:"cpu"`
	Memory string `yaml:"memory"`
}

type Resources

type Resources struct {
	provisioner.RemoteFileSpec `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 S3Folder

type S3Folder struct {
	// contains filtered or unexported fields
}

func (S3Folder) Path

func (f S3Folder) Path() string

func (S3Folder) URI

func (f S3Folder) URI() string

type S3Folders

type S3Folders struct {
	// contains filtered or unexported fields
}

func NewS3Folders

func NewS3Folders(s3URI string, clusterName string) S3Folders

func (S3Folders) Cluster

func (n S3Folders) Cluster() S3Folder

func (S3Folders) ClusterBackups

func (n S3Folders) ClusterBackups() S3Folder

func (S3Folders) ClusterExportedStacks

func (n S3Folders) ClusterExportedStacks() S3Folder

type SecurityGroup

type SecurityGroup struct {
	Identifier `yaml:",inline"`
}

SecurityGroup references one of existing security groups in your AWS account

type SelfHosting

type SelfHosting struct {
	Type            string           `yaml:"type"`
	Typha           bool             `yaml:"typha"`
	TyphaResources  ComputeResources `yaml:"typhaResources,omitempty"`
	CalicoNodeImage Image            `yaml:"calicoNodeImage"`
	CalicoCniImage  Image            `yaml:"calicoCniImage"`
	FlannelImage    Image            `yaml:"flannelImage"`
	FlannelCniImage Image            `yaml:"flannelCniImage"`
	TyphaImage      Image            `yaml:"typhaImage"`
	FlannelConfig   FlannelConfig    `yaml:"flannelConfig"`
	CalicoConfig    CalicoConfig     `yaml:"calicoConfig"`
}

type ShellColour

type ShellColour int
const (
	DefaultColour ShellColour = iota
	Black
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
	DarkGray
	LightRed
	LightGreen
	LightYellow
	LightBlue
	LightMagenta
	LightCyan
	LightWhite
)

func ShellColourString

func ShellColourString(s string) (ShellColour, error)

ShellColourString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ShellColourValues

func ShellColourValues() []ShellColour

ShellColourValues returns all values of the enum

func (ShellColour) IsAShellColour

func (i ShellColour) IsAShellColour() bool

IsAShellColour returns "true" if the value is listed in the enum definition. "false" otherwise

func (ShellColour) MarshalYAML

func (i ShellColour) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for ShellColour

func (ShellColour) Off

func (colour ShellColour) Off() string

func (ShellColour) On

func (colour ShellColour) On() string

func (ShellColour) PCOff

func (colour ShellColour) PCOff() string

func (ShellColour) PCOn

func (colour ShellColour) PCOn() string

func (ShellColour) String

func (i ShellColour) String() string

func (*ShellColour) UnmarshalYAML

func (i *ShellColour) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for ShellColour

type Source

type Source struct {
	Path string `yaml:"path,omitempty"`
}

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) Enabled

func (f SpotFleet) Enabled() bool

func (SpotFleet) IAMFleetRoleRef

func (f SpotFleet) IAMFleetRoleRef() string

func (*SpotFleet) UnmarshalYAML

func (f *SpotFleet) UnmarshalYAML(unmarshal func(interface{}) error) error

func (SpotFleet) Validate

func (c SpotFleet) Validate() error

type Stack

type Stack struct {
	Resources `yaml:"resources,omitempty"`
	Outputs   `yaml:"outputs,omitempty"`
	Tags      `yaml:"tags,omitempty"`
}

Stack represents a set of customizations to a CloudFormation stack template Top-level keys should be one of: Resources, Outputs Second-level keys should be cfn resource names

type StackNameOverrides

type StackNameOverrides struct {
	ControlPlane string `yaml:"controlPlane,omitempty"`
	Network      string `yaml:"network,omitempty"`
	Etcd         string `yaml:"etcd,omitempty"`
}

type StackTemplateOptions

type StackTemplateOptions struct {
	AssetsDir             string
	ControllerTmplFile    string
	EtcdTmplFile          string
	WorkerTmplFile        string
	StackTemplateTmplFile string
	S3URI                 string
	PrettyPrint           bool
	SkipWait              bool
}

type Stacks

type Stacks struct {
	Root         Stack `yaml:"root,omitempty"`
	Network      Stack `yaml:"network,omitempty"`
	ControlPlane Stack `yaml:"controlPlane,omitempty"`
	Etcd         Stack `yaml:"etcd,omitempty"`
	NodePool     Stack `yaml:"nodePool,omitempty"`
}

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 NewExistingPrivateSubnet

func NewExistingPrivateSubnet(az string, id string) Subnet

func NewExistingPublicSubnet

func NewExistingPublicSubnet(az string, id string) Subnet

func NewImportedPrivateSubnet

func NewImportedPrivateSubnet(az string, name string) Subnet

func NewImportedPublicSubnet

func NewImportedPublicSubnet(az string, name string) Subnet

func NewPrivateSubnet

func NewPrivateSubnet(az string, cidr string) Subnet

func NewPrivateSubnetFromFn

func NewPrivateSubnetFromFn(az string, fn string) Subnet

func NewPrivateSubnetWithPreconfiguredNATGateway

func NewPrivateSubnetWithPreconfiguredNATGateway(az string, cidr string, ngw string) Subnet

func NewPrivateSubnetWithPreconfiguredNATGatewayEIP

func NewPrivateSubnetWithPreconfiguredNATGatewayEIP(az string, cidr string, alloc string) Subnet

func NewPrivateSubnetWithPreconfiguredRouteTable

func NewPrivateSubnetWithPreconfiguredRouteTable(az string, cidr string, rtb string) Subnet

func NewPublicSubnet

func NewPublicSubnet(az string, cidr string) Subnet

func NewPublicSubnetFromFn

func NewPublicSubnetFromFn(az string, fn string) Subnet

func NewPublicSubnetWithPreconfiguredRouteTable

func NewPublicSubnetWithPreconfiguredRouteTable(az string, cidr string, rtb string) Subnet

func (*Subnet) InternetGatewayRouteLogicalName

func (s *Subnet) InternetGatewayRouteLogicalName() string

func (*Subnet) LogicalName

func (s *Subnet) LogicalName() string

func (*Subnet) LogicalNameOrErr

func (s *Subnet) LogicalNameOrErr() (string, error)

func (*Subnet) ManageNATGateway

func (s *Subnet) ManageNATGateway() bool

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

func (s *Subnet) ManageRouteTable() bool

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

func (s *Subnet) ManageRouteToInternet() bool

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

func (s *Subnet) ManageRouteToNATGateway() bool

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

func (s *Subnet) ManageSubnet() bool

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 (s *Subnet) MapPublicIPs() bool

func (*Subnet) NATGatewayRouteLogicalName

func (s *Subnet) NATGatewayRouteLogicalName() string

func (*Subnet) Public

func (s *Subnet) Public() bool

func (*Subnet) Ref

func (s *Subnet) Ref() string

Ref returns ID or ref to newly created resource

func (*Subnet) RouteTableID

func (s *Subnet) RouteTableID() string

func (*Subnet) RouteTableLogicalName

func (s *Subnet) RouteTableLogicalName() (string, error)

RouteTableLogicalName represents the name of the route table to which this subnet is associated.

func (*Subnet) RouteTableRef

func (s *Subnet) RouteTableRef() (string, error)

func (*Subnet) Validate

func (s *Subnet) Validate() error

type SubnetReference

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 Subnets

type Subnets []Subnet

func (Subnets) ContainsBothPrivateAndPublic

func (s Subnets) ContainsBothPrivateAndPublic() bool

func (Subnets) ImportFromNetworkStack

func (ss Subnets) ImportFromNetworkStack() (Subnets, error)

func (Subnets) ImportFromNetworkStackRetainingNames

func (ss Subnets) ImportFromNetworkStackRetainingNames() (Subnets, error)

func (Subnets) RefByName

func (ss Subnets) RefByName(name string) (string, error)

type Systemd

type Systemd struct {
	// Units is a list of systemd units installed on the nodes
	Units SystemdUnits `yaml:"units,omitempty"`
}

type SystemdMessageResponse

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 SystemdUnit

type SystemdUnit struct {
	Name string `yaml:"name,omitempty"`
	// Contents must be a valid go text template producing a valid systemd unit definition
	Contents `yaml:",inline"`
}

type SystemdUnits

type SystemdUnits []SystemdUnit

type Tags

type Tags struct {
	provisioner.RemoteFileSpec `yaml:",inline"`
}

type Taint

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

func (Taint) String

func (t Taint) String() string

String returns a taint represented in string

func (Taint) Validate

func (t Taint) Validate() error

Validate returns an error if the taint is invalid

type Taints

type Taints []Taint

Taints is a list of taints

func (Taints) String

func (t Taints) String() string

String returns a comma-separated list of taints

func (Taints) Validate

func (t Taints) Validate() error

Validate returns an error if the list of taints are invalid as a group

type TargetGroup

type TargetGroup struct {
	Enabled          bool     `yaml:"enabled"`
	Arns             []string `yaml:"arns"`
	SecurityGroupIds []string `yaml:"securityGroupIds"`
}

type UnknownKeys

type UnknownKeys map[string]interface{}

func (UnknownKeys) FailWhenUnknownKeysFound

func (unknownKeys UnknownKeys) FailWhenUnknownKeysFound(keyPath string) error

type UserData

type UserData struct {
	Parts map[string]*UserDataPart
	Path  string
}

UserData represents userdata which might be split across multiple storage types

func NewUserDataFromTemplateFile

func NewUserDataFromTemplateFile(templateFile string, context interface{}, opts ...UserDataOption) (UserData, error)

NewUserDataFromTemplateFile creates userdata struct from template file. Template file is expected to have defined subtemplates (Parts) which are of various part and storage types TODO Extract this out of the clusterapi package as this is an "implementation"

type UserDataOption

type UserDataOption func(*userDataOpt)

func UserDataPartsOpt

func UserDataPartsOpt(Parts ...PartDesc) UserDataOption

Parts to find in UserData template file

type UserDataPart

type UserDataPart struct {
	Asset Asset
	// contains filtered or unexported fields
}

func (UserDataPart) Base64

func (self UserDataPart) Base64(compress bool, extra ...map[string]interface{}) (string, error)

func (UserDataPart) Template

func (self UserDataPart) Template(extra ...map[string]interface{}) (string, error)

type UserDataValidateFunc

type UserDataValidateFunc func(content []byte) error

UserDataValidateFunc returns error if templated Part content doesn't pass validation

type UserSuppliedArgs

type UserSuppliedArgs struct {
	QuotaBackendBytes       int `yaml:"quotaBackendBytes,omitempty"`
	AutoCompactionRetention int `yaml:"autoCompactionRetention,omitempty"`
}

type VPC

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.

func (VPC) ImportFromNetworkStack

func (v VPC) ImportFromNetworkStack() VPC

type Values

type Values map[string]interface{}

type WaitSignal

type WaitSignal struct {
	// WaitSignal is enabled by default. If you'd like to explicitly disable it, set this to `false`.
	// Keeping this `nil` results in the WaitSignal to be enabled.
	EnabledOverride      *bool `yaml:"enabled"`
	MaxBatchSizeOverride *int  `yaml:"maxBatchSize"`
}

func (WaitSignal) Enabled

func (s WaitSignal) Enabled() bool

func (WaitSignal) MaxBatchSize

func (s WaitSignal) MaxBatchSize(def int) int

MaxBatchSize return the MaxBatchOverride if set otherwise return the default

type Webhook

type Webhook struct {
	Enabled  bool   `yaml:"enabled"`
	CacheTTL string `yaml:"cacheTTL"`
	Config   string `yaml:"configBase64"`
}

type Worker

type Worker struct {
	APIEndpointName         string           `yaml:"apiEndpointName,omitempty"`
	NodePools               []WorkerNodePool `yaml:"nodePools,omitempty"`
	NodePoolRollingStrategy string           `yaml:"nodePoolRollingStrategy,omitempty"`
	UnknownKeys             `yaml:",inline"`
}

type WorkerNodePool

type WorkerNodePool struct {
	Experimental        `yaml:",inline"`
	Kubelet             `yaml:",inline"`
	KubeClusterSettings `yaml:",inline"`
	DeploymentSettings  `yaml:",inline"`

	Plugins      PluginConfigs `yaml:"kubeAwsPlugins,omitempty"`
	Private      bool          `yaml:"private,omitempty"`
	NodePoolName string        `yaml:"name,omitempty"`

	APIEndpointName           string           `yaml:"apiEndpointName,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              []NodeVolumeMount      `yaml:"volumeMounts,omitempty"`
	Raid0Mounts               []Raid0Mount           `yaml:"raid0Mounts,omitempty"`
	NodeSettings              `yaml:",inline"`
	NodeStatusUpdateFrequency string              `yaml:"nodeStatusUpdateFrequency"`
	CustomFiles               []CustomFile        `yaml:"customFiles,omitempty"`
	CustomSystemdUnits        []CustomSystemdUnit `yaml:"customSystemdUnits,omitempty"`
	Gpu                       Gpu                 `yaml:"gpu"`
	NodePoolRollingStrategy   string              `yaml:"nodePoolRollingStrategy,omitempty"`
	UnknownKeys               `yaml:",inline"`
}

func NewDefaultNodePoolConfig

func NewDefaultNodePoolConfig() WorkerNodePool

func (WorkerNodePool) LaunchConfigurationLogicalName

func (c WorkerNodePool) LaunchConfigurationLogicalName() string

func (WorkerNodePool) LaunchTemplateLogicalName

func (c WorkerNodePool) LaunchTemplateLogicalName() string

func (WorkerNodePool) LogicalName

func (c WorkerNodePool) LogicalName() string

func (WorkerNodePool) MaxCount

func (c WorkerNodePool) MaxCount() int

func (WorkerNodePool) MinCount

func (c WorkerNodePool) MinCount() int

func (WorkerNodePool) NodePoolLogicalName

func (c WorkerNodePool) NodePoolLogicalName() string

NodePoolLogicalName returns a sanitized name of this pool which is usable as a valid cloudformation nested stack name

func (WorkerNodePool) RollingUpdateMinInstancesInService

func (c WorkerNodePool) RollingUpdateMinInstancesInService() int

func (*WorkerNodePool) UnmarshalYAML

func (c *WorkerNodePool) UnmarshalYAML(unmarshal func(interface{}) error) error

func (WorkerNodePool) Validate

func (c WorkerNodePool) Validate(experimental Experimental) error

func (WorkerNodePool) WithDefaultsFrom

func (c WorkerNodePool) WithDefaultsFrom(main DefaultWorkerSettings) WorkerNodePool

Jump to

Keyboard shortcuts

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