Skip to content

Commit 8811464

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 5d04702 commit 8811464

24 files changed

+238
-133
lines changed

cmd/clusterawsadm/cloudformation/bootstrap/cluster_api_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ func (t Template) ControllersPolicy() *iamv1.PolicyDocument {
193193
"arn:*:autoscaling:*:*:autoScalingGroup:*:autoScalingGroupName/*",
194194
},
195195
Action: iamv1.Actions{
196+
"autoscaling:CancelInstanceRefresh",
196197
"autoscaling:CreateAutoScalingGroup",
197198
"autoscaling:UpdateAutoScalingGroup",
198199
"autoscaling:CreateOrUpdateTags",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ Resources:
249249
Resource:
250250
- '*'
251251
- Action:
252+
- autoscaling:CancelInstanceRefresh
252253
- autoscaling:CreateAutoScalingGroup
253254
- autoscaling:UpdateAutoScalingGroup
254255
- autoscaling:CreateOrUpdateTags

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ Resources:
249249
Resource:
250250
- '*'
251251
- Action:
252+
- autoscaling:CancelInstanceRefresh
252253
- autoscaling:CreateAutoScalingGroup
253254
- autoscaling:UpdateAutoScalingGroup
254255
- 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
@@ -255,6 +255,7 @@ Resources:
255255
Resource:
256256
- '*'
257257
- Action:
258+
- autoscaling:CancelInstanceRefresh
258259
- autoscaling:CreateAutoScalingGroup
259260
- autoscaling:UpdateAutoScalingGroup
260261
- 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
@@ -249,6 +249,7 @@ Resources:
249249
Resource:
250250
- '*'
251251
- Action:
252+
- autoscaling:CancelInstanceRefresh
252253
- autoscaling:CreateAutoScalingGroup
253254
- autoscaling:UpdateAutoScalingGroup
254255
- 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
@@ -255,6 +255,7 @@ Resources:
255255
Resource:
256256
- '*'
257257
- Action:
258+
- autoscaling:CancelInstanceRefresh
258259
- autoscaling:CreateAutoScalingGroup
259260
- autoscaling:UpdateAutoScalingGroup
260261
- 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
@@ -255,6 +255,7 @@ Resources:
255255
Resource:
256256
- '*'
257257
- Action:
258+
- autoscaling:CancelInstanceRefresh
258259
- autoscaling:CreateAutoScalingGroup
259260
- autoscaling:UpdateAutoScalingGroup
260261
- 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
@@ -249,6 +249,7 @@ Resources:
249249
Resource:
250250
- '*'
251251
- Action:
252+
- autoscaling:CancelInstanceRefresh
252253
- autoscaling:CreateAutoScalingGroup
253254
- autoscaling:UpdateAutoScalingGroup
254255
- 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
@@ -249,6 +249,7 @@ Resources:
249249
Resource:
250250
- '*'
251251
- Action:
252+
- autoscaling:CancelInstanceRefresh
252253
- autoscaling:CreateAutoScalingGroup
253254
- autoscaling:UpdateAutoScalingGroup
254255
- 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
@@ -249,6 +249,7 @@ Resources:
249249
Resource:
250250
- '*'
251251
- Action:
252+
- autoscaling:CancelInstanceRefresh
252253
- autoscaling:CreateAutoScalingGroup
253254
- autoscaling:UpdateAutoScalingGroup
254255
- autoscaling:CreateOrUpdateTags

0 commit comments

Comments
 (0)