Documentation
¶
Index ¶
- func GetCreateLaunchTemplateInput(ctx context.Context, options *amifamily.LaunchTemplate, ...) *ec2.CreateLaunchTemplateInput
- func InjectDoNotSyncTaintsLabel(amiFamilyName string, labels map[string]string) map[string]string
- func LaunchTemplateName(options *amifamily.LaunchTemplate) string
- type DefaultProvider
- func (p *DefaultProvider) CreateAMIOptions(ctx context.Context, nodeClass *v1.EC2NodeClass, ...) (*amifamily.Options, error)
- func (p *DefaultProvider) DeleteAll(ctx context.Context, nodeClass *v1.EC2NodeClass) error
- func (p *DefaultProvider) EnsureAll(ctx context.Context, nodeClass *v1.EC2NodeClass, nodeClaim *karpv1.NodeClaim, ...) ([]*LaunchTemplate, error)
- func (p *DefaultProvider) InvalidateCache(ctx context.Context, ltName string, ltID string)
- func (p *DefaultProvider) ResolveClusterCIDR(ctx context.Context) error
- type LaunchTemplate
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCreateLaunchTemplateInput ¶ added in v1.3.0
func GetCreateLaunchTemplateInput( ctx context.Context, options *amifamily.LaunchTemplate, ClusterIPFamily corev1.IPFamily, userData string, ) *ec2.CreateLaunchTemplateInput
you need UserData, AmiID, tags, blockdevicemappings, instance profile,
func InjectDoNotSyncTaintsLabel ¶ added in v1.5.0
InjectDoNotSyncTaintsLabel adds a label for all non-custom AMI families. It is exported just for ease of testing. This label is to tell karpenter that it should *not* sync taints. This is to work around a race condition. By default, this label is not added to the custom AMI family as users may still want their taints synced. Startup taints will be racy for custom AMIs if they do not add this label, however. https://github.com/kubernetes-sigs/karpenter/issues/1772
func LaunchTemplateName ¶ added in v0.36.0
func LaunchTemplateName(options *amifamily.LaunchTemplate) string
Types ¶
type DefaultProvider ¶ added in v0.36.0
type DefaultProvider struct {
sync.Mutex
KubeDNSIP net.IP
CABundle *string
ClusterEndpoint string
ClusterCIDR atomic.Pointer[string]
ClusterIPFamily corev1.IPFamily
// contains filtered or unexported fields
}
func NewDefaultProvider ¶ added in v0.36.0
func NewDefaultProvider(ctx context.Context, cache *cache.Cache, ec2api sdk.EC2API, eksapi sdk.EKSAPI, amiFamily amifamily.Resolver, securityGroupProvider securitygroup.Provider, subnetProvider subnet.Provider, caBundle *string, startAsync <-chan struct{}, kubeDNSIP net.IP, clusterEndpoint string) *DefaultProvider
func (*DefaultProvider) CreateAMIOptions ¶ added in v1.3.3
func (p *DefaultProvider) CreateAMIOptions(ctx context.Context, nodeClass *v1.EC2NodeClass, labels, tags map[string]string) (*amifamily.Options, error)
func (*DefaultProvider) DeleteAll ¶ added in v0.36.0
func (p *DefaultProvider) DeleteAll(ctx context.Context, nodeClass *v1.EC2NodeClass) error
func (*DefaultProvider) EnsureAll ¶ added in v0.36.0
func (p *DefaultProvider) EnsureAll( ctx context.Context, nodeClass *v1.EC2NodeClass, nodeClaim *karpv1.NodeClaim, instanceTypes []*cloudprovider.InstanceType, capacityType string, tags map[string]string, ) ([]*LaunchTemplate, error)
func (*DefaultProvider) InvalidateCache ¶ added in v0.36.0
func (p *DefaultProvider) InvalidateCache(ctx context.Context, ltName string, ltID string)
InvalidateCache deletes a launch template from cache if it exists
func (*DefaultProvider) ResolveClusterCIDR ¶ added in v0.36.0
func (p *DefaultProvider) ResolveClusterCIDR(ctx context.Context) error
type LaunchTemplate ¶
type LaunchTemplate struct {
Name string
InstanceTypes []*cloudprovider.InstanceType
ImageID string
CapacityReservationID string
}
type Provider ¶
type Provider interface {
EnsureAll(context.Context, *v1.EC2NodeClass, *karpv1.NodeClaim,
[]*cloudprovider.InstanceType, string, map[string]string) ([]*LaunchTemplate, error)
DeleteAll(context.Context, *v1.EC2NodeClass) error
InvalidateCache(context.Context, string, string)
ResolveClusterCIDR(context.Context) error
CreateAMIOptions(context.Context, *v1.EC2NodeClass, map[string]string, map[string]string) (*amifamily.Options, error)
}
Click to show internal directories.
Click to hide internal directories.