Documentation ¶
Index ¶
- Variables
- type AL2
- func (a AL2) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
- func (a AL2) EphemeralBlockDevice() *string
- func (a AL2) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
- func (a AL2) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
- type AMIFamily
- type AMIProvider
- type Bottlerocket
- func (b Bottlerocket) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
- func (b Bottlerocket) EphemeralBlockDevice() *string
- func (b Bottlerocket) FeatureFlags() FeatureFlags
- func (b Bottlerocket) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
- func (b Bottlerocket) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
- type Custom
- func (c Custom) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
- func (c Custom) EphemeralBlockDevice() *string
- func (c Custom) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
- func (c Custom) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
- type DefaultFamily
- type FeatureFlags
- type LaunchTemplate
- type Options
- type Resolver
- type Ubuntu
- func (u Ubuntu) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
- func (u Ubuntu) EphemeralBlockDevice() *string
- func (u Ubuntu) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
- func (u Ubuntu) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, ...) bootstrap.Bootstrapper
- type UserDataProvider
Constants ¶
This section is empty.
Variables ¶
var DefaultEBS = v1alpha1.BlockDevice{ Encrypted: aws.Bool(true), VolumeType: aws.String(ec2.VolumeTypeGp3), VolumeSize: ptr.Quantity(resource.MustParse("20Gi")), }
Functions ¶
This section is empty.
Types ¶
type AL2 ¶
type AL2 struct { DefaultFamily *Options }
func (AL2) DefaultBlockDeviceMappings ¶
func (a AL2) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (AL2) EphemeralBlockDevice ¶ added in v0.11.0
func (AL2) SSMAlias ¶
func (a AL2) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
SSMAlias returns the AMI Alias to query SSM
func (AL2) UserData ¶
func (a AL2) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, instanceTypes []cloudprovider.InstanceType, customUserData *string) 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 AMIFamily ¶
type AMIFamily interface { UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []core.Taint, labels map[string]string, caBundle *string, instanceTypes []cloudprovider.InstanceType, customUserData *string) bootstrap.Bootstrapper SSMAlias(version string, instanceType cloudprovider.InstanceType) string DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping DefaultMetadataOptions() *v1alpha1.MetadataOptions EphemeralBlockDevice() *string FeatureFlags() FeatureFlags }
AMIFamily can be implemented to override the default logic for generating dynamic launch template parameters
func GetAMIFamily ¶ added in v0.11.0
type AMIProvider ¶
type AMIProvider struct {
// contains filtered or unexported fields
}
func (*AMIProvider) Get ¶
func (p *AMIProvider) Get(ctx context.Context, provider *awsv1alpha1.AWS, nodeRequest *cloudprovider.NodeRequest, options *Options, amiFamily AMIFamily) (map[string][]cloudprovider.InstanceType, error)
Get returns a set of AMIIDs and corresponding instance types. AMI may vary due to architecture, accelerator, etc If AMI overrides are specified in the AWSNodeTemplate, then only those AMIs will be chosen.
type Bottlerocket ¶
type Bottlerocket struct { DefaultFamily *Options }
func (Bottlerocket) DefaultBlockDeviceMappings ¶
func (b Bottlerocket) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (Bottlerocket) EphemeralBlockDevice ¶ added in v0.11.0
func (b Bottlerocket) EphemeralBlockDevice() *string
func (Bottlerocket) FeatureFlags ¶ added in v0.17.0
func (b Bottlerocket) FeatureFlags() FeatureFlags
func (Bottlerocket) SSMAlias ¶
func (b Bottlerocket) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
SSMAlias returns the AMI Alias to query SSM
func (Bottlerocket) UserData ¶
func (b Bottlerocket) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []cloudprovider.InstanceType, customUserData *string) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family
type Custom ¶ added in v0.14.0
type Custom struct { DefaultFamily *Options }
func (Custom) DefaultBlockDeviceMappings ¶ added in v0.14.0
func (c Custom) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
func (Custom) EphemeralBlockDevice ¶ added in v0.14.0
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) SSMAlias ¶ added in v0.14.0
func (c Custom) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
func (Custom) UserData ¶ added in v0.14.0
func (c Custom) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []cloudprovider.InstanceType, customUserData *string) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family
type DefaultFamily ¶ added in v0.17.0
type DefaultFamily struct{}
DefaultFamily provides default values for AMIFamilies that compose it
func (DefaultFamily) FeatureFlags ¶ added in v0.17.0
func (d DefaultFamily) FeatureFlags() FeatureFlags
type FeatureFlags ¶ added in v0.17.0
type FeatureFlags struct { UsesENILimitedMemoryOverhead bool PodsPerCoreEnabled bool EvictionSoftEnabled bool }
FeatureFlags describes whether the features below are enabled for a given AMIFamily
type LaunchTemplate ¶
type LaunchTemplate struct { *Options UserData bootstrap.Bootstrapper BlockDeviceMappings []*v1alpha1.BlockDeviceMapping MetadataOptions *v1alpha1.MetadataOptions AMIID string InstanceTypes []cloudprovider.InstanceType `hash:"ignore"` }
LaunchTemplate holds the dynamically generated launch template parameters
type Options ¶
type Options struct { ClusterName string ClusterEndpoint string AWSENILimitedPodDensity bool InstanceProfile string CABundle *string `hash:"ignore"` // Level-triggered fields that may change out of sync. KubernetesVersion string SecurityGroupsIDs []string Tags map[string]string Labels map[string]string `hash:"ignore"` }
Options define the static launch template parameters
func (Options) DefaultMetadataOptions ¶
func (Options) DefaultMetadataOptions() *v1alpha1.MetadataOptions
type Resolver ¶
type Resolver struct { UserDataProvider *UserDataProvider // contains filtered or unexported fields }
Resolver is able to fill-in dynamic launch template parameters
func New ¶
func New(ctx context.Context, ssm ssmiface.SSMAPI, ec2api ec2iface.EC2API, ssmCache *cache.Cache, ec2Cache *cache.Cache, client client.Client) *Resolver
New constructs a new launch template Resolver
func (Resolver) Resolve ¶
func (r Resolver) Resolve(ctx context.Context, provider *v1alpha1.AWS, nodeRequest *cloudprovider.NodeRequest, 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) DefaultBlockDeviceMappings ¶
func (u Ubuntu) DefaultBlockDeviceMappings() []*v1alpha1.BlockDeviceMapping
DefaultBlockDeviceMappings returns the default block device mappings for the AMI Family
func (Ubuntu) EphemeralBlockDevice ¶ added in v0.11.0
func (Ubuntu) SSMAlias ¶
func (u Ubuntu) SSMAlias(version string, instanceType cloudprovider.InstanceType) string
SSMAlias returns the AMI Alias to query SSM
func (Ubuntu) UserData ¶
func (u Ubuntu) UserData(kubeletConfig *v1alpha5.KubeletConfiguration, taints []v1.Taint, labels map[string]string, caBundle *string, _ []cloudprovider.InstanceType, customUserData *string) bootstrap.Bootstrapper
UserData returns the default userdata script for the AMI Family
type UserDataProvider ¶ added in v0.11.0
type UserDataProvider struct {
// contains filtered or unexported fields
}
func NewUserDataProvider ¶ added in v0.11.0
func NewUserDataProvider(kubeClient client.Client) *UserDataProvider
NewUserDataProvider constructs a new UserData provider
func (*UserDataProvider) Get ¶ added in v0.11.0
func (u *UserDataProvider) Get(ctx context.Context, providerRef *v1alpha5.ProviderRef) (string, error)
Get returns the UserData from the ConfigMap specified in the provider