Documentation ¶
Index ¶
- Variables
- type AL2
- type AMI
- type AMIFamily
- type AMIs
- type Bottlerocket
- func (b Bottlerocket) DefaultAMIs(version string) []DefaultAMIOutput
- func (b Bottlerocket) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
- func (b Bottlerocket) EphemeralBlockDevice() *string
- func (b Bottlerocket) FeatureFlags() FeatureFlags
- func (b Bottlerocket) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
- type Custom
- func (c Custom) DefaultAMIs(_ string) []DefaultAMIOutput
- func (c Custom) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
- func (c Custom) EphemeralBlockDevice() *string
- func (c Custom) UserData(_ *corev1beta1.KubeletConfiguration, _ []v1.Taint, _ map[string]string, ...) bootstrap.Bootstrapper
- type DefaultAMIOutput
- type DefaultFamily
- type FeatureFlags
- type FiltersAndOwners
- type LaunchTemplate
- type Options
- type Provider
- type Resolver
- type Ubuntu
- func (u Ubuntu) DefaultAMIs(version string) []DefaultAMIOutput
- func (u Ubuntu) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
- func (u Ubuntu) EphemeralBlockDevice() *string
- func (u Ubuntu) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
- type Windows
- func (w Windows) DefaultAMIs(version string) []DefaultAMIOutput
- func (w Windows) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
- func (w Windows) EphemeralBlockDevice() *string
- func (w Windows) FeatureFlags() FeatureFlags
- func (w Windows) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
Constants ¶
This section is empty.
Variables ¶
var DefaultEBS = v1beta1.BlockDevice{ Encrypted: aws.Bool(true), VolumeType: aws.String(ec2.VolumeTypeGp3), VolumeSize: lo.ToPtr(resource.MustParse("20Gi")), }
Functions ¶
This section is empty.
Types ¶
type AL2 ¶
type AL2 struct { DefaultFamily *Options }
func (AL2) DefaultAMIs ¶
func (a AL2) DefaultAMIs(version string) []DefaultAMIOutput
DefaultAMIs returns the AMI name, and Requirements, with an SSM query
func (AL2) DefaultBlockDeviceMappings ¶
func (a AL2) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (AL2) EphemeralBlockDevice ¶
func (AL2) UserData ¶
func (a AL2) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []*cloudprovider.InstanceType, customUserData *string, instanceStorePolicy *v1beta1.InstanceStorePolicy) bootstrap.Bootstrapper
UserData returns the exact same string for equivalent input, even if elements of those inputs are in differing orders, guaranteeing it won't cause spurious hash differences. AL2 userdata also works on Ubuntu
type AMI ¶
type AMI struct { Name string AmiID string CreationDate string Requirements scheduling.Requirements }
type AMIFamily ¶
type AMIFamily interface { DefaultAMIs(version string) []DefaultAMIOutput UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []core.Taint, labels map[string]string, caBundle *string, instanceTypes []*cloudprovider.InstanceType, customUserData *string, instanceStorePolicy *v1beta1.InstanceStorePolicy) bootstrap.Bootstrapper DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping DefaultMetadataOptions() *v1beta1.MetadataOptions EphemeralBlockDevice() *string FeatureFlags() FeatureFlags }
AMIFamily can be implemented to override the default logic for generating dynamic launch template parameters
func GetAMIFamily ¶
type AMIs ¶
type AMIs []AMI
func (AMIs) MapToInstanceTypes ¶
func (a AMIs) MapToInstanceTypes(instanceTypes []*cloudprovider.InstanceType) map[string][]*cloudprovider.InstanceType
MapToInstanceTypes returns a map of AMIIDs that are the most recent on creationDate to compatible instancetypes
type Bottlerocket ¶
type Bottlerocket struct { DefaultFamily *Options }
func (Bottlerocket) DefaultAMIs ¶
func (b Bottlerocket) DefaultAMIs(version string) []DefaultAMIOutput
DefaultAMIs returns the AMI name, and Requirements, with an SSM query
func (Bottlerocket) DefaultBlockDeviceMappings ¶
func (b Bottlerocket) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (Bottlerocket) EphemeralBlockDevice ¶
func (b Bottlerocket) EphemeralBlockDevice() *string
func (Bottlerocket) FeatureFlags ¶
func (b Bottlerocket) FeatureFlags() FeatureFlags
func (Bottlerocket) UserData ¶
func (b Bottlerocket) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []*cloudprovider.InstanceType, customUserData *string, _ *v1beta1.InstanceStorePolicy) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family
type Custom ¶
type Custom struct { DefaultFamily *Options }
func (Custom) DefaultAMIs ¶
func (c Custom) DefaultAMIs(_ string) []DefaultAMIOutput
func (Custom) DefaultBlockDeviceMappings ¶
func (c Custom) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
func (Custom) EphemeralBlockDevice ¶
EphemeralBlockDevice is the block device that the pods on the node will use. For an AMI of a custom family, this is unknown to us.
func (Custom) UserData ¶
func (c Custom) UserData(_ *corev1beta1.KubeletConfiguration, _ []v1.Taint, _ map[string]string, _ *string, _ []*cloudprovider.InstanceType, customUserData *string, _ *v1beta1.InstanceStorePolicy) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family
type DefaultAMIOutput ¶
type DefaultAMIOutput struct { Query string Requirements scheduling.Requirements }
type DefaultFamily ¶
type DefaultFamily struct{}
DefaultFamily provides default values for AMIFamilies that compose it
func (DefaultFamily) FeatureFlags ¶
func (d DefaultFamily) FeatureFlags() FeatureFlags
type FeatureFlags ¶
type FeatureFlags struct { UsesENILimitedMemoryOverhead bool PodsPerCoreEnabled bool EvictionSoftEnabled bool SupportsENILimitedPodDensity bool }
FeatureFlags describes whether the features below are enabled for a given AMIFamily
type FiltersAndOwners ¶
func GetFilterAndOwnerSets ¶
func GetFilterAndOwnerSets(terms []v1beta1.AMISelectorTerm) (res []FiltersAndOwners)
type LaunchTemplate ¶
type LaunchTemplate struct { *Options UserData bootstrap.Bootstrapper BlockDeviceMappings []*v1beta1.BlockDeviceMapping MetadataOptions *v1beta1.MetadataOptions AMIID string InstanceTypes []*cloudprovider.InstanceType `hash:"ignore"` DetailedMonitoring bool EFACount int CapacityType string }
LaunchTemplate holds the dynamically generated launch template parameters
type Options ¶
type Options struct { ClusterName string ClusterEndpoint string InstanceProfile string CABundle *string `hash:"ignore"` InstanceStorePolicy *v1beta1.InstanceStorePolicy // Level-triggered fields that may change out of sync. SecurityGroups []v1beta1.SecurityGroup Tags map[string]string Labels map[string]string `hash:"ignore"` KubeDNSIP net.IP AssociatePublicIPAddress *bool NodeClassName string }
Options define the static launch template parameters
func (Options) DefaultMetadataOptions ¶
func (o Options) DefaultMetadataOptions() *v1beta1.MetadataOptions
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is able to fill-in dynamic launch template parameters
func (Resolver) Resolve ¶
func (r Resolver) Resolve(ctx context.Context, nodeClass *v1beta1.EC2NodeClass, nodeClaim *corev1beta1.NodeClaim, instanceTypes []*cloudprovider.InstanceType, capacityType string, options *Options) ([]*LaunchTemplate, error)
Resolve generates launch templates using the static options and dynamically generates launch template parameters. Multiple ResolvedTemplates are returned based on the instanceTypes passed in to support special AMIs for certain instance types like GPUs.
type Ubuntu ¶
type Ubuntu struct { DefaultFamily *Options }
func (Ubuntu) DefaultAMIs ¶
func (u Ubuntu) DefaultAMIs(version string) []DefaultAMIOutput
DefaultAMIs returns the AMI name, and Requirements, with an SSM query
func (Ubuntu) DefaultBlockDeviceMappings ¶
func (u Ubuntu) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (Ubuntu) EphemeralBlockDevice ¶
func (Ubuntu) UserData ¶
func (u Ubuntu) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []*cloudprovider.InstanceType, customUserData *string, _ *v1beta1.InstanceStorePolicy) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family
type Windows ¶
type Windows struct { DefaultFamily *Options Version string Build string }
func (Windows) DefaultAMIs ¶
func (w Windows) DefaultAMIs(version string) []DefaultAMIOutput
func (Windows) DefaultBlockDeviceMappings ¶
func (w Windows) DefaultBlockDeviceMappings() []*v1beta1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (Windows) EphemeralBlockDevice ¶
func (Windows) FeatureFlags ¶
func (w Windows) FeatureFlags() FeatureFlags
func (Windows) UserData ¶
func (w Windows) UserData(kubeletConfig *corev1beta1.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []*cloudprovider.InstanceType, customUserData *string, _ *v1beta1.InstanceStorePolicy) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family