Skip to content

Commit 56f83a4

Browse files
committed
Cancel instance refresh on any relevant change to ASG instead of blocking until previous one is finished (which may have led to failing nodes due to outdated join token)
1 parent e7dddb6 commit 56f83a4

26 files changed

+235
-106
lines changed

cmd/clusterawsadm/cloudformation/bootstrap/cluster_api_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ func (t Template) ControllersPolicy() *iamv1.PolicyDocument {
198198
"arn:*:autoscaling:*:*:autoScalingGroup:*:autoScalingGroupName/*",
199199
},
200200
Action: iamv1.Actions{
201+
"autoscaling:CancelInstanceRefresh",
201202
"autoscaling:CreateAutoScalingGroup",
202203
"autoscaling:UpdateAutoScalingGroup",
203204
"autoscaling:CreateOrUpdateTags",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Resources:
254254
Resource:
255255
- '*'
256256
- Action:
257+
- autoscaling:CancelInstanceRefresh
257258
- autoscaling:CreateAutoScalingGroup
258259
- autoscaling:UpdateAutoScalingGroup
259260
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Resources:
254254
Resource:
255255
- '*'
256256
- Action:
257+
- autoscaling:CancelInstanceRefresh
257258
- autoscaling:CreateAutoScalingGroup
258259
- autoscaling:UpdateAutoScalingGroup
259260
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Resources:
260260
Resource:
261261
- '*'
262262
- Action:
263+
- autoscaling:CancelInstanceRefresh
263264
- autoscaling:CreateAutoScalingGroup
264265
- autoscaling:UpdateAutoScalingGroup
265266
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Resources:
254254
Resource:
255255
- '*'
256256
- Action:
257+
- autoscaling:CancelInstanceRefresh
257258
- autoscaling:CreateAutoScalingGroup
258259
- autoscaling:UpdateAutoScalingGroup
259260
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Resources:
260260
Resource:
261261
- '*'
262262
- Action:
263+
- autoscaling:CancelInstanceRefresh
263264
- autoscaling:CreateAutoScalingGroup
264265
- autoscaling:UpdateAutoScalingGroup
265266
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Resources:
260260
Resource:
261261
- '*'
262262
- Action:
263+
- autoscaling:CancelInstanceRefresh
263264
- autoscaling:CreateAutoScalingGroup
264265
- autoscaling:UpdateAutoScalingGroup
265266
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Resources:
254254
Resource:
255255
- '*'
256256
- Action:
257+
- autoscaling:CancelInstanceRefresh
257258
- autoscaling:CreateAutoScalingGroup
258259
- autoscaling:UpdateAutoScalingGroup
259260
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Resources:
254254
Resource:
255255
- '*'
256256
- Action:
257+
- autoscaling:CancelInstanceRefresh
257258
- autoscaling:CreateAutoScalingGroup
258259
- autoscaling:UpdateAutoScalingGroup
259260
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Resources:
254254
Resource:
255255
- '*'
256256
- Action:
257+
- autoscaling:CancelInstanceRefresh
257258
- autoscaling:CreateAutoScalingGroup
258259
- autoscaling:UpdateAutoScalingGroup
259260
- autoscaling:CreateOrUpdateTags

0 commit comments

Comments
 (0)