forked from aws/eks-anywhere-build-tooling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 1-27 Cluster Autoscaler Reconciling Error
kubernetes/autoscaler#4676 introduced a bug to the cluster autoscaler clusterapi reconciler. The cluster autoscaler executable attempts to reconcile MachinePool resources, but does not have sufficient permissions to do so in its ClusterRole.
- Loading branch information
1 parent
e777caa
commit 028d74e
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
projects/kubernetes/autoscaler/1-27/helm/patches/0007-Authorize-MachinePool-Operations.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From ce8b20934c6cba955f0b2c5ad06113588e750d30 Mon Sep 17 00:00:00 2001 | ||
From: Prow Bot <[email protected]> | ||
Date: Mon, 22 May 2023 16:56:31 -0400 | ||
Subject: [PATCH] Authorize MachinePool Operations | ||
|
||
https://github.com/kubernetes/autoscaler/pull/4676 Introduced a bug where the autoscaler runtime fails to reconcile other CAPI machine resources when its ClusterRole is not authorized to list and watch MachinePool resources. | ||
|
||
See: https://github.com/kubernetes/autoscaler/commit/17d2bd968e756d97598be3ffb333957f0cfe99bf#diff-c8813a0942bbcd464aaa04a04c2c71897d5df30b65a2db86cb81773016f24406R786 | ||
|
||
To resolve this issue, we authorize appropriate operations on MachinePool resources. | ||
--- | ||
charts/cluster-autoscaler/templates/clusterrole.yaml | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/charts/cluster-autoscaler/templates/clusterrole.yaml b/charts/cluster-autoscaler/templates/clusterrole.yaml | ||
index e3d36557f..63a65a044 100644 | ||
--- a/charts/cluster-autoscaler/templates/clusterrole.yaml | ||
+++ b/charts/cluster-autoscaler/templates/clusterrole.yaml | ||
@@ -152,6 +152,8 @@ rules: | ||
resources: | ||
- machinedeployments | ||
- machinedeployments/scale | ||
+ - machinepools | ||
+ - machinepools/scale | ||
- machines | ||
- machinesets | ||
verbs: | ||
-- | ||
2.37.1 (Apple Git-137.1) | ||
|