File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -396,6 +396,7 @@ func (m *MachinePoolScope) GetRuntimeObject() runtime.Object {
396396 return m .AWSMachinePool
397397}
398398
399+ // GetLifecycleHooks returns the desired lifecycle hooks for the ASG.
399400func (m * MachinePoolScope ) GetLifecycleHooks () []expinfrav1.AWSLifecycleHook {
400401 return m .AWSMachinePool .Spec .AWSLifecycleHooks
401402}
Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ func (s *ManagedMachinePoolScope) GetRuntimeObject() runtime.Object {
412412 return s .ManagedMachinePool
413413}
414414
415- func (m * ManagedMachinePoolScope ) GetLifecycleHooks () []expinfrav1.AWSLifecycleHook {
416- return m .ManagedMachinePool .Spec .AWSLifecycleHooks
415+ // GetLifecycleHooks returns the desired lifecycle hooks for the ASG.
416+ func (s * ManagedMachinePoolScope ) GetLifecycleHooks () []expinfrav1.AWSLifecycleHook {
417+ return s .ManagedMachinePool .Spec .AWSLifecycleHooks
417418}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import (
3232 "sigs.k8s.io/cluster-api/util/conditions"
3333)
3434
35- // GetLifecycleHooks returns the lifecycle hooks for the given AutoScalingGroup after retrieving them from the AWS API.
35+ // DescribeLifecycleHooks returns the lifecycle hooks for the given AutoScalingGroup after retrieving them from the AWS API.
3636func (s * Service ) DescribeLifecycleHooks (asgName string ) ([]* expinfrav1.AWSLifecycleHook , error ) {
3737 input := & autoscaling.DescribeLifecycleHooksInput {
3838 AutoScalingGroupName : aws .String (asgName ),
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ import (
4141 "sigs.k8s.io/cluster-api/util/annotations"
4242)
4343
44- // Built-in EKS lifecycle hooks should not be changed
44+ // IgnoredEKSLifecycleHooks lists built-in EKS lifecycle hooks
45+ // that should not be changed or deleted.
4546var IgnoredEKSLifecycleHooks = map [string ]bool {
4647 "Launch-LC-Hook" : true ,
4748 "Terminate-LC-Hook" : true ,
You can’t perform that action at this time.
0 commit comments