Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lints
Browse files Browse the repository at this point in the history
AndiDog committed Nov 20, 2024
1 parent c036b28 commit 4fd675c
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions pkg/cloud/scope/machinepool.go
Original file line number Diff line number Diff line change
@@ -396,6 +396,7 @@ func (m *MachinePoolScope) GetRuntimeObject() runtime.Object {
return m.AWSMachinePool
}

// GetLifecycleHooks returns the desired lifecycle hooks for the ASG.
func (m *MachinePoolScope) GetLifecycleHooks() []expinfrav1.AWSLifecycleHook {
return m.AWSMachinePool.Spec.AWSLifecycleHooks
}
5 changes: 3 additions & 2 deletions pkg/cloud/scope/managednodegroup.go
Original file line number Diff line number Diff line change
@@ -412,6 +412,7 @@ func (s *ManagedMachinePoolScope) GetRuntimeObject() runtime.Object {
return s.ManagedMachinePool
}

func (m *ManagedMachinePoolScope) GetLifecycleHooks() []expinfrav1.AWSLifecycleHook {
return m.ManagedMachinePool.Spec.AWSLifecycleHooks
// GetLifecycleHooks returns the desired lifecycle hooks for the ASG.
func (s *ManagedMachinePoolScope) GetLifecycleHooks() []expinfrav1.AWSLifecycleHook {
return s.ManagedMachinePool.Spec.AWSLifecycleHooks
}
2 changes: 1 addition & 1 deletion pkg/cloud/services/autoscaling/lifecyclehook.go
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ import (
"sigs.k8s.io/cluster-api/util/conditions"
)

// GetLifecycleHooks returns the lifecycle hooks for the given AutoScalingGroup after retrieving them from the AWS API.
// DescribeLifecycleHooks returns the lifecycle hooks for the given AutoScalingGroup after retrieving them from the AWS API.
func (s *Service) DescribeLifecycleHooks(asgName string) ([]*expinfrav1.AWSLifecycleHook, error) {
input := &autoscaling.DescribeLifecycleHooksInput{
AutoScalingGroupName: aws.String(asgName),
3 changes: 2 additions & 1 deletion pkg/cloud/services/eks/nodegroup.go
Original file line number Diff line number Diff line change
@@ -41,7 +41,8 @@ import (
"sigs.k8s.io/cluster-api/util/annotations"
)

// Built-in EKS lifecycle hooks should not be changed
// IgnoredEKSLifecycleHooks lists built-in EKS lifecycle hooks
// that should not be changed or deleted.
var IgnoredEKSLifecycleHooks = map[string]bool{
"Launch-LC-Hook": true,
"Terminate-LC-Hook": true,

0 comments on commit 4fd675c

Please sign in to comment.