Skip to content

Commit 586e18a

Browse files
sebltmAndiDog
authored andcommitted
feat: custom lifecyclehooks for machinepools
Taken and rebased from unfinished PR kubernetes-sigs#4875 at commit 2421ec3 Co-authored-by: Andreas Sommer <[email protected]>
1 parent 85827a4 commit 586e18a

39 files changed

+1372
-89
lines changed

cmd/clusterawsadm/cloudformation/bootstrap/cluster_api_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ func (t Template) ControllersPolicy() *iamv1.PolicyDocument {
174174
"elasticloadbalancing:DeleteListener",
175175
"autoscaling:DescribeAutoScalingGroups",
176176
"autoscaling:DescribeInstanceRefreshes",
177+
"autoscaling:DeleteLifecycleHook",
178+
"autoscaling:DescribeLifecycleHooks",
179+
"autoscaling:PutLifecycleHook",
177180
"ec2:CreateLaunchTemplate",
178181
"ec2:CreateLaunchTemplateVersion",
179182
"ec2:DescribeLaunchTemplates",

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/customsuffix.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ Resources:
233233
- elasticloadbalancing:DeleteListener
234234
- autoscaling:DescribeAutoScalingGroups
235235
- autoscaling:DescribeInstanceRefreshes
236+
- autoscaling:DeleteLifecycleHook
237+
- autoscaling:DescribeLifecycleHooks
238+
- autoscaling:PutLifecycleHook
236239
- ec2:CreateLaunchTemplate
237240
- ec2:CreateLaunchTemplateVersion
238241
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/default.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ Resources:
233233
- elasticloadbalancing:DeleteListener
234234
- autoscaling:DescribeAutoScalingGroups
235235
- autoscaling:DescribeInstanceRefreshes
236+
- autoscaling:DeleteLifecycleHook
237+
- autoscaling:DescribeLifecycleHooks
238+
- autoscaling:PutLifecycleHook
236239
- ec2:CreateLaunchTemplate
237240
- ec2:CreateLaunchTemplateVersion
238241
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_all_secret_backends.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ Resources:
239239
- elasticloadbalancing:DeleteListener
240240
- autoscaling:DescribeAutoScalingGroups
241241
- autoscaling:DescribeInstanceRefreshes
242+
- autoscaling:DeleteLifecycleHook
243+
- autoscaling:DescribeLifecycleHooks
244+
- autoscaling:PutLifecycleHook
242245
- ec2:CreateLaunchTemplate
243246
- ec2:CreateLaunchTemplateVersion
244247
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_allow_assume_role.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ Resources:
233233
- elasticloadbalancing:DeleteListener
234234
- autoscaling:DescribeAutoScalingGroups
235235
- autoscaling:DescribeInstanceRefreshes
236+
- autoscaling:DeleteLifecycleHook
237+
- autoscaling:DescribeLifecycleHooks
238+
- autoscaling:PutLifecycleHook
236239
- ec2:CreateLaunchTemplate
237240
- ec2:CreateLaunchTemplateVersion
238241
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_bootstrap_user.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ Resources:
239239
- elasticloadbalancing:DeleteListener
240240
- autoscaling:DescribeAutoScalingGroups
241241
- autoscaling:DescribeInstanceRefreshes
242+
- autoscaling:DeleteLifecycleHook
243+
- autoscaling:DescribeLifecycleHooks
244+
- autoscaling:PutLifecycleHook
242245
- ec2:CreateLaunchTemplate
243246
- ec2:CreateLaunchTemplateVersion
244247
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_custom_bootstrap_user.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ Resources:
239239
- elasticloadbalancing:DeleteListener
240240
- autoscaling:DescribeAutoScalingGroups
241241
- autoscaling:DescribeInstanceRefreshes
242+
- autoscaling:DeleteLifecycleHook
243+
- autoscaling:DescribeLifecycleHooks
244+
- autoscaling:PutLifecycleHook
242245
- ec2:CreateLaunchTemplate
243246
- ec2:CreateLaunchTemplateVersion
244247
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_different_instance_profiles.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ Resources:
233233
- elasticloadbalancing:DeleteListener
234234
- autoscaling:DescribeAutoScalingGroups
235235
- autoscaling:DescribeInstanceRefreshes
236+
- autoscaling:DeleteLifecycleHook
237+
- autoscaling:DescribeLifecycleHooks
238+
- autoscaling:PutLifecycleHook
236239
- ec2:CreateLaunchTemplate
237240
- ec2:CreateLaunchTemplateVersion
238241
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_eks_console.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ Resources:
233233
- elasticloadbalancing:DeleteListener
234234
- autoscaling:DescribeAutoScalingGroups
235235
- autoscaling:DescribeInstanceRefreshes
236+
- autoscaling:DeleteLifecycleHook
237+
- autoscaling:DescribeLifecycleHooks
238+
- autoscaling:PutLifecycleHook
236239
- ec2:CreateLaunchTemplate
237240
- ec2:CreateLaunchTemplateVersion
238241
- ec2:DescribeLaunchTemplates

cmd/clusterawsadm/cloudformation/bootstrap/fixtures/with_eks_default_roles.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ Resources:
233233
- elasticloadbalancing:DeleteListener
234234
- autoscaling:DescribeAutoScalingGroups
235235
- autoscaling:DescribeInstanceRefreshes
236+
- autoscaling:DeleteLifecycleHook
237+
- autoscaling:DescribeLifecycleHooks
238+
- autoscaling:PutLifecycleHook
236239
- ec2:CreateLaunchTemplate
237240
- ec2:CreateLaunchTemplateVersion
238241
- ec2:DescribeLaunchTemplates

0 commit comments

Comments
 (0)