diff --git a/charts/cluster-autoscaler/templates/clusterrole.yaml b/charts/cluster-autoscaler/templates/clusterrole.yaml index 63a65a044421..4ee33d81b477 100644 --- a/charts/cluster-autoscaler/templates/clusterrole.yaml +++ b/charts/cluster-autoscaler/templates/clusterrole.yaml @@ -151,9 +151,7 @@ rules: - cluster.x-k8s.io resources: - machinedeployments - - machinedeployments/scale - machinepools - - machinepools/scale - machines - machinesets verbs: @@ -161,5 +159,14 @@ rules: - list - update - watch + - apiGroups: + - cluster.x-k8s.io + resources: + - machinedeployments/scale + - machinepools/scale + verbs: + - get + - patch + - update {{- end }} {{- end -}} diff --git a/charts/cluster-autoscaler/templates/role.yaml b/charts/cluster-autoscaler/templates/role.yaml index 1fe013fe1ac7..44b1678af4d8 100644 --- a/charts/cluster-autoscaler/templates/role.yaml +++ b/charts/cluster-autoscaler/templates/role.yaml @@ -49,9 +49,7 @@ rules: - cluster.x-k8s.io resources: - machinedeployments - - machinedeployments/scale - machinepools - - machinepools/scale - machines - machinesets verbs: @@ -59,6 +57,15 @@ rules: - list - update - watch + - apiGroups: + - cluster.x-k8s.io + resources: + - machinedeployments/scale + - machinepools/scale + verbs: + - get + - patch + - update {{- end }} {{- if ( not .Values.rbac.clusterScoped ) }} - apiGroups: