Documentation ¶
Index ¶
- Constants
- Variables
- func FilterSupportedArch(architectures []string) string
- type DiscoveredState
- func (d *DiscoveredState) GetAttachedPolicies() []*iam.AttachedPolicy
- func (d *DiscoveredState) GetCluster() *eks.Cluster
- func (d *DiscoveredState) GetClusterCA() string
- func (d *DiscoveredState) GetClusterEndpoint() string
- func (d *DiscoveredState) GetClusterNodes() *corev1.NodeList
- func (d *DiscoveredState) GetClusterVersion() string
- func (d *DiscoveredState) GetInstanceProfile() *iam.InstanceProfile
- func (d *DiscoveredState) GetInstanceTypeInfo() []*ec2.InstanceTypeInfo
- func (d *DiscoveredState) GetOwnedScalingGroups() []*autoscaling.Group
- func (d *DiscoveredState) GetRole() *iam.Role
- func (d *DiscoveredState) GetRunningInstanceTypes() []string
- func (d *DiscoveredState) GetScalingConfiguration() scaling.Configuration
- func (d *DiscoveredState) GetScalingGroup() *autoscaling.Group
- func (d *DiscoveredState) GetVPCId() string
- func (d *DiscoveredState) HasRole() bool
- func (d *DiscoveredState) HasScalingGroup() bool
- func (d *DiscoveredState) IsNodesReady() bool
- func (d *DiscoveredState) IsProvisioned() bool
- func (d *DiscoveredState) SetAttachedPolicies(policies []*iam.AttachedPolicy)
- func (d *DiscoveredState) SetCluster(cluster *eks.Cluster)
- func (d *DiscoveredState) SetClusterNodes(nodes *corev1.NodeList)
- func (d *DiscoveredState) SetInstanceProfile(profile *iam.InstanceProfile)
- func (d *DiscoveredState) SetInstanceTypeInfo(instanceTypeInfo []*ec2.InstanceTypeInfo)
- func (d *DiscoveredState) SetNodesReady(condition bool)
- func (d *DiscoveredState) SetOwnedScalingGroups(groups []*autoscaling.Group)
- func (d *DiscoveredState) SetProvisioned(provisioned bool)
- func (d *DiscoveredState) SetRole(role *iam.Role)
- func (d *DiscoveredState) SetScalingGroup(asg *autoscaling.Group)
- func (d *DiscoveredState) SetSubFamilyFlexiblePool(pool map[string][]InstanceSpec)
- func (d *DiscoveredState) SetVPCId(id string)
- type EKSUserData
- type EksInstanceGroupContext
- func (ctx *EksInstanceGroupContext) BootstrapNodes() error
- func (ctx *EksInstanceGroupContext) CloudDiscovery() error
- func (ctx *EksInstanceGroupContext) Create() error
- func (ctx *EksInstanceGroupContext) CreateManagedRole() error
- func (ctx *EksInstanceGroupContext) CreateScalingGroup(name string) error
- func (ctx *EksInstanceGroupContext) Delete() error
- func (ctx *EksInstanceGroupContext) DeleteManagedRole() error
- func (ctx *EksInstanceGroupContext) DeleteScalingGroup() error
- func (ctx *EksInstanceGroupContext) GetAddedHooks() ([]v1alpha1.LifecycleHookSpec, bool)
- func (ctx *EksInstanceGroupContext) GetAddedTags(asgName string) []*autoscaling.Tag
- func (ctx *EksInstanceGroupContext) GetBasicUserData(clusterName, args string, kubeletExtraArgs string, payload UserDataPayload, ...) string
- func (ctx *EksInstanceGroupContext) GetBootstrapArgs() string
- func (ctx *EksInstanceGroupContext) GetComputedBootstrapOptions() *v1alpha1.BootstrapOptions
- func (ctx *EksInstanceGroupContext) GetComputedLabels() map[string]string
- func (ctx *EksInstanceGroupContext) GetDesiredMixedInstancesPolicy(name string) *autoscaling.MixedInstancesPolicy
- func (ctx *EksInstanceGroupContext) GetDisabledMetrics() ([]string, bool)
- func (ctx *EksInstanceGroupContext) GetDiscoveredState() *DiscoveredState
- func (ctx *EksInstanceGroupContext) GetEksLatestAmi() (string, error)
- func (ctx *EksInstanceGroupContext) GetEksSsmAmi(id string) (string, error)
- func (ctx *EksInstanceGroupContext) GetEnabledMetrics() ([]string, bool)
- func (ctx *EksInstanceGroupContext) GetInstanceGroup() *v1alpha1.InstanceGroup
- func (ctx *EksInstanceGroupContext) GetKubeletExtraArgs() string
- func (ctx *EksInstanceGroupContext) GetLabelList() []string
- func (ctx *EksInstanceGroupContext) GetManagedPoliciesList(additionalPolicies []string) []string
- func (ctx *EksInstanceGroupContext) GetMountOpts() []MountOpts
- func (ctx *EksInstanceGroupContext) GetOsFamily() string
- func (ctx *EksInstanceGroupContext) GetOverrides() []*autoscaling.LaunchTemplateOverrides
- func (ctx *EksInstanceGroupContext) GetRemovedHooks() ([]string, bool)
- func (ctx *EksInstanceGroupContext) GetRemovedTags(asgName string) []*autoscaling.Tag
- func (ctx *EksInstanceGroupContext) GetState() v1alpha1.ReconcileState
- func (ctx *EksInstanceGroupContext) GetTaintList() []string
- func (ctx *EksInstanceGroupContext) GetUpgradeStrategy() *v1alpha1.AwsUpgradeStrategy
- func (ctx *EksInstanceGroupContext) GetUserDataStages() UserDataPayload
- func (ctx *EksInstanceGroupContext) IsReady() bool
- func (ctx *EksInstanceGroupContext) Locked() bool
- func (ctx *EksInstanceGroupContext) NewRollingUpdateRequest() *kubeprovider.RollingUpdateRequest
- func (ctx *EksInstanceGroupContext) RemoveAuthRole(arn string) error
- func (ctx *EksInstanceGroupContext) ResolveSecurityGroups() []string
- func (ctx *EksInstanceGroupContext) ResolveSubnets() []string
- func (ctx *EksInstanceGroupContext) ScalingGroupUpdateNeeded(configName string) bool
- func (ctx *EksInstanceGroupContext) SetDiscoveredState(state *DiscoveredState)
- func (ctx *EksInstanceGroupContext) SetState(state v1alpha1.ReconcileState)
- func (ctx *EksInstanceGroupContext) StateDiscovery()
- func (ctx *EksInstanceGroupContext) TagsUpdateNeeded() bool
- func (ctx *EksInstanceGroupContext) Update() error
- func (ctx *EksInstanceGroupContext) UpdateLifecycleHooks(asgName string) error
- func (ctx *EksInstanceGroupContext) UpdateManagedPolicies(roleName string) error
- func (ctx *EksInstanceGroupContext) UpdateMetricsCollection(asgName string) error
- func (ctx *EksInstanceGroupContext) UpdateNodeReadyCondition() bool
- func (ctx *EksInstanceGroupContext) UpdateScalingGroup(configName string, scalingConfig *scaling.Configuration) (bool, error)
- func (ctx *EksInstanceGroupContext) UpdateScalingProcesses(asgName string) error
- func (ctx *EksInstanceGroupContext) UpdateWarmPool(asgName string) error
- func (ctx *EksInstanceGroupContext) UpgradeNodes() error
- type InstancePool
- type InstancePoolSpec
- type InstancePoolType
- type InstanceSpec
- type MountOpts
- type UserDataPayload
Constants ¶
View Source
const ( ProvisionerName = "eks" OverrideDefaultLabelsAnnotation = "instancemgr.keikoproj.io/default-labels" IRSAEnabledAnnotation = "instancemgr.keikoproj.io/irsa-enabled" OsFamilyAnnotation = "instancemgr.keikoproj.io/os-family" ClusterAutoscalerEnabledAnnotation = "instancemgr.keikoproj.io/cluster-autoscaler-enabled" CustomNetworkingEnabledAnnotation = "instancemgr.keikoproj.io/custom-networking-enabled" CustomNetworkingHostPodsAnnotation = "instancemgr.keikoproj.io/custom-networking-host-pods" CustomNetworkingPrefixAssignmentEnabledAnnotation = "instancemgr.keikoproj.io/custom-networking-prefix-assignment-enabled" OsFamilyWindows = "windows" OsFamilyBottleRocket = "bottlerocket" OsFamilyAmazonLinux2 = "amazonlinux2" )
View Source
const (
ScalingGroupDeletionStatus = "Delete in progress"
)
Variables ¶
View Source
var ( RoleNewLabel = "node.kubernetes.io/role" RoleNewLabelFmt = "node.kubernetes.io/role=%s" RoleOldLabel = "node-role.kubernetes.io/%s" RoleOldLabelFmt = "node-role.kubernetes.io/%s=\"\"" InstanceMgrLifecycleLabel = "instancemgr.keikoproj.io/lifecycle" InstanceMgrImageLabel = "instancemgr.keikoproj.io/image" AllowedOsFamilies = []string{OsFamilyWindows, OsFamilyBottleRocket, OsFamilyAmazonLinux2} DefaultManagedPolicies = []string{"AmazonEKSWorkerNodePolicy", "AmazonEC2ContainerRegistryReadOnly"} CNIManagedPolicy = "AmazonEKS_CNI_Policy" SupportedArchitectures = []string{"x86_64", "arm64"} )
Functions ¶
func FilterSupportedArch ¶
Types ¶
type DiscoveredState ¶
type DiscoveredState struct { Provisioned bool NodesReady bool ClusterNodes *corev1.NodeList OwnedScalingGroups []*autoscaling.Group ScalingGroup *autoscaling.Group LifecycleHooks []*autoscaling.LifecycleHook ScalingConfiguration scaling.Configuration IAMRole *iam.Role AttachedPolicies []*iam.AttachedPolicy InstanceProfile *iam.InstanceProfile Publisher kubeprovider.EventPublisher Cluster *eks.Cluster VPCId string InstancePool InstancePoolSpec InstanceTypeInfo []*ec2.InstanceTypeInfo }
func (*DiscoveredState) GetAttachedPolicies ¶
func (d *DiscoveredState) GetAttachedPolicies() []*iam.AttachedPolicy
func (*DiscoveredState) GetCluster ¶
func (d *DiscoveredState) GetCluster() *eks.Cluster
func (*DiscoveredState) GetClusterCA ¶
func (d *DiscoveredState) GetClusterCA() string
func (*DiscoveredState) GetClusterEndpoint ¶
func (d *DiscoveredState) GetClusterEndpoint() string
func (*DiscoveredState) GetClusterNodes ¶
func (d *DiscoveredState) GetClusterNodes() *corev1.NodeList
func (*DiscoveredState) GetClusterVersion ¶
func (d *DiscoveredState) GetClusterVersion() string
func (*DiscoveredState) GetInstanceProfile ¶
func (d *DiscoveredState) GetInstanceProfile() *iam.InstanceProfile
func (*DiscoveredState) GetInstanceTypeInfo ¶
func (d *DiscoveredState) GetInstanceTypeInfo() []*ec2.InstanceTypeInfo
func (*DiscoveredState) GetOwnedScalingGroups ¶
func (d *DiscoveredState) GetOwnedScalingGroups() []*autoscaling.Group
func (*DiscoveredState) GetRole ¶
func (d *DiscoveredState) GetRole() *iam.Role
func (*DiscoveredState) GetRunningInstanceTypes ¶
func (d *DiscoveredState) GetRunningInstanceTypes() []string
func (*DiscoveredState) GetScalingConfiguration ¶
func (d *DiscoveredState) GetScalingConfiguration() scaling.Configuration
func (*DiscoveredState) GetScalingGroup ¶
func (d *DiscoveredState) GetScalingGroup() *autoscaling.Group
func (*DiscoveredState) GetVPCId ¶
func (d *DiscoveredState) GetVPCId() string
func (*DiscoveredState) HasRole ¶
func (d *DiscoveredState) HasRole() bool
func (*DiscoveredState) HasScalingGroup ¶
func (d *DiscoveredState) HasScalingGroup() bool
func (*DiscoveredState) IsNodesReady ¶
func (d *DiscoveredState) IsNodesReady() bool
func (*DiscoveredState) IsProvisioned ¶
func (d *DiscoveredState) IsProvisioned() bool
func (*DiscoveredState) SetAttachedPolicies ¶
func (d *DiscoveredState) SetAttachedPolicies(policies []*iam.AttachedPolicy)
func (*DiscoveredState) SetCluster ¶
func (d *DiscoveredState) SetCluster(cluster *eks.Cluster)
func (*DiscoveredState) SetClusterNodes ¶
func (d *DiscoveredState) SetClusterNodes(nodes *corev1.NodeList)
func (*DiscoveredState) SetInstanceProfile ¶
func (d *DiscoveredState) SetInstanceProfile(profile *iam.InstanceProfile)
func (*DiscoveredState) SetInstanceTypeInfo ¶
func (d *DiscoveredState) SetInstanceTypeInfo(instanceTypeInfo []*ec2.InstanceTypeInfo)
func (*DiscoveredState) SetNodesReady ¶
func (d *DiscoveredState) SetNodesReady(condition bool)
func (*DiscoveredState) SetOwnedScalingGroups ¶
func (d *DiscoveredState) SetOwnedScalingGroups(groups []*autoscaling.Group)
func (*DiscoveredState) SetProvisioned ¶
func (d *DiscoveredState) SetProvisioned(provisioned bool)
func (*DiscoveredState) SetRole ¶
func (d *DiscoveredState) SetRole(role *iam.Role)
func (*DiscoveredState) SetScalingGroup ¶
func (d *DiscoveredState) SetScalingGroup(asg *autoscaling.Group)
func (*DiscoveredState) SetSubFamilyFlexiblePool ¶
func (d *DiscoveredState) SetSubFamilyFlexiblePool(pool map[string][]InstanceSpec)
func (*DiscoveredState) SetVPCId ¶
func (d *DiscoveredState) SetVPCId(id string)
type EKSUserData ¶
type EksInstanceGroupContext ¶
type EksInstanceGroupContext struct { sync.Mutex InstanceGroup *v1alpha1.InstanceGroup KubernetesClient kubeprovider.KubernetesClientSet AwsWorker awsprovider.AwsWorker DiscoveredState *DiscoveredState Log logr.Logger Configuration *provisioners.ProvisionerConfiguration ConfigRetention int ResourcePrefix string Metrics *common.MetricsCollector DisableWinClusterInjection bool }
func New ¶
func New(p provisioners.ProvisionerInput) *EksInstanceGroupContext
New constructs a new instance group provisioner of EKS type
func (*EksInstanceGroupContext) BootstrapNodes ¶
func (ctx *EksInstanceGroupContext) BootstrapNodes() error
func (*EksInstanceGroupContext) CloudDiscovery ¶
func (ctx *EksInstanceGroupContext) CloudDiscovery() error
func (*EksInstanceGroupContext) Create ¶
func (ctx *EksInstanceGroupContext) Create() error
func (*EksInstanceGroupContext) CreateManagedRole ¶
func (ctx *EksInstanceGroupContext) CreateManagedRole() error
func (*EksInstanceGroupContext) CreateScalingGroup ¶
func (ctx *EksInstanceGroupContext) CreateScalingGroup(name string) error
func (*EksInstanceGroupContext) Delete ¶
func (ctx *EksInstanceGroupContext) Delete() error
func (*EksInstanceGroupContext) DeleteManagedRole ¶
func (ctx *EksInstanceGroupContext) DeleteManagedRole() error
func (*EksInstanceGroupContext) DeleteScalingGroup ¶
func (ctx *EksInstanceGroupContext) DeleteScalingGroup() error
func (*EksInstanceGroupContext) GetAddedHooks ¶
func (ctx *EksInstanceGroupContext) GetAddedHooks() ([]v1alpha1.LifecycleHookSpec, bool)
func (*EksInstanceGroupContext) GetAddedTags ¶
func (ctx *EksInstanceGroupContext) GetAddedTags(asgName string) []*autoscaling.Tag
func (*EksInstanceGroupContext) GetBasicUserData ¶
func (ctx *EksInstanceGroupContext) GetBasicUserData(clusterName, args string, kubeletExtraArgs string, payload UserDataPayload, mounts []MountOpts) string
func (*EksInstanceGroupContext) GetBootstrapArgs ¶
func (ctx *EksInstanceGroupContext) GetBootstrapArgs() string
func (*EksInstanceGroupContext) GetComputedBootstrapOptions ¶
func (ctx *EksInstanceGroupContext) GetComputedBootstrapOptions() *v1alpha1.BootstrapOptions
func (*EksInstanceGroupContext) GetComputedLabels ¶
func (ctx *EksInstanceGroupContext) GetComputedLabels() map[string]string
func (*EksInstanceGroupContext) GetDesiredMixedInstancesPolicy ¶
func (ctx *EksInstanceGroupContext) GetDesiredMixedInstancesPolicy(name string) *autoscaling.MixedInstancesPolicy
func (*EksInstanceGroupContext) GetDisabledMetrics ¶
func (ctx *EksInstanceGroupContext) GetDisabledMetrics() ([]string, bool)
func (*EksInstanceGroupContext) GetDiscoveredState ¶
func (ctx *EksInstanceGroupContext) GetDiscoveredState() *DiscoveredState
func (*EksInstanceGroupContext) GetEksLatestAmi ¶
func (ctx *EksInstanceGroupContext) GetEksLatestAmi() (string, error)
func (*EksInstanceGroupContext) GetEksSsmAmi ¶
func (ctx *EksInstanceGroupContext) GetEksSsmAmi(id string) (string, error)
func (*EksInstanceGroupContext) GetEnabledMetrics ¶
func (ctx *EksInstanceGroupContext) GetEnabledMetrics() ([]string, bool)
func (*EksInstanceGroupContext) GetInstanceGroup ¶
func (ctx *EksInstanceGroupContext) GetInstanceGroup() *v1alpha1.InstanceGroup
func (*EksInstanceGroupContext) GetKubeletExtraArgs ¶
func (ctx *EksInstanceGroupContext) GetKubeletExtraArgs() string
func (*EksInstanceGroupContext) GetLabelList ¶
func (ctx *EksInstanceGroupContext) GetLabelList() []string
func (*EksInstanceGroupContext) GetManagedPoliciesList ¶
func (ctx *EksInstanceGroupContext) GetManagedPoliciesList(additionalPolicies []string) []string
func (*EksInstanceGroupContext) GetMountOpts ¶
func (ctx *EksInstanceGroupContext) GetMountOpts() []MountOpts
func (*EksInstanceGroupContext) GetOsFamily ¶
func (ctx *EksInstanceGroupContext) GetOsFamily() string
func (*EksInstanceGroupContext) GetOverrides ¶
func (ctx *EksInstanceGroupContext) GetOverrides() []*autoscaling.LaunchTemplateOverrides
func (*EksInstanceGroupContext) GetRemovedHooks ¶
func (ctx *EksInstanceGroupContext) GetRemovedHooks() ([]string, bool)
func (*EksInstanceGroupContext) GetRemovedTags ¶
func (ctx *EksInstanceGroupContext) GetRemovedTags(asgName string) []*autoscaling.Tag
func (*EksInstanceGroupContext) GetState ¶
func (ctx *EksInstanceGroupContext) GetState() v1alpha1.ReconcileState
func (*EksInstanceGroupContext) GetTaintList ¶
func (ctx *EksInstanceGroupContext) GetTaintList() []string
func (*EksInstanceGroupContext) GetUpgradeStrategy ¶
func (ctx *EksInstanceGroupContext) GetUpgradeStrategy() *v1alpha1.AwsUpgradeStrategy
func (*EksInstanceGroupContext) GetUserDataStages ¶
func (ctx *EksInstanceGroupContext) GetUserDataStages() UserDataPayload
func (*EksInstanceGroupContext) IsReady ¶
func (ctx *EksInstanceGroupContext) IsReady() bool
func (*EksInstanceGroupContext) Locked ¶
func (ctx *EksInstanceGroupContext) Locked() bool
func (*EksInstanceGroupContext) NewRollingUpdateRequest ¶
func (ctx *EksInstanceGroupContext) NewRollingUpdateRequest() *kubeprovider.RollingUpdateRequest
func (*EksInstanceGroupContext) RemoveAuthRole ¶
func (ctx *EksInstanceGroupContext) RemoveAuthRole(arn string) error
func (*EksInstanceGroupContext) ResolveSecurityGroups ¶
func (ctx *EksInstanceGroupContext) ResolveSecurityGroups() []string
func (*EksInstanceGroupContext) ResolveSubnets ¶
func (ctx *EksInstanceGroupContext) ResolveSubnets() []string
func (*EksInstanceGroupContext) ScalingGroupUpdateNeeded ¶
func (ctx *EksInstanceGroupContext) ScalingGroupUpdateNeeded(configName string) bool
func (*EksInstanceGroupContext) SetDiscoveredState ¶
func (ctx *EksInstanceGroupContext) SetDiscoveredState(state *DiscoveredState)
func (*EksInstanceGroupContext) SetState ¶
func (ctx *EksInstanceGroupContext) SetState(state v1alpha1.ReconcileState)
func (*EksInstanceGroupContext) StateDiscovery ¶
func (ctx *EksInstanceGroupContext) StateDiscovery()
func (*EksInstanceGroupContext) TagsUpdateNeeded ¶
func (ctx *EksInstanceGroupContext) TagsUpdateNeeded() bool
func (*EksInstanceGroupContext) Update ¶
func (ctx *EksInstanceGroupContext) Update() error
func (*EksInstanceGroupContext) UpdateLifecycleHooks ¶
func (ctx *EksInstanceGroupContext) UpdateLifecycleHooks(asgName string) error
func (*EksInstanceGroupContext) UpdateManagedPolicies ¶
func (ctx *EksInstanceGroupContext) UpdateManagedPolicies(roleName string) error
func (*EksInstanceGroupContext) UpdateMetricsCollection ¶
func (ctx *EksInstanceGroupContext) UpdateMetricsCollection(asgName string) error
func (*EksInstanceGroupContext) UpdateNodeReadyCondition ¶
func (ctx *EksInstanceGroupContext) UpdateNodeReadyCondition() bool
func (*EksInstanceGroupContext) UpdateScalingGroup ¶
func (ctx *EksInstanceGroupContext) UpdateScalingGroup(configName string, scalingConfig *scaling.Configuration) (bool, error)
func (*EksInstanceGroupContext) UpdateScalingProcesses ¶
func (ctx *EksInstanceGroupContext) UpdateScalingProcesses(asgName string) error
func (*EksInstanceGroupContext) UpdateWarmPool ¶
func (ctx *EksInstanceGroupContext) UpdateWarmPool(asgName string) error
func (*EksInstanceGroupContext) UpgradeNodes ¶
func (ctx *EksInstanceGroupContext) UpgradeNodes() error
type InstancePool ¶
type InstancePool struct { Type InstancePoolType Pool map[string][]InstanceSpec }
func (*InstancePool) GetPool ¶
func (p *InstancePool) GetPool(key string) ([]InstanceSpec, bool)
type InstancePoolSpec ¶
type InstancePoolSpec struct {
SubFamilyFlexiblePool InstancePool
}
type InstancePoolType ¶
type InstancePoolType string
const (
SubFamilyFlexible InstancePoolType = "SubFamilyFlexible"
)
type InstanceSpec ¶
type UserDataPayload ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.