- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.2k
 
Description
Which component are you using?:
/area cluster-autoscaler
What version of the component are you using?:
Component version: main/1.33
What k8s version are you using (kubectl version)?:
1.32/1.33
What environment is this in?:
cluster-api (all capi providers)
What did you expect to happen?:
i expect labels defined by the cluster-api metadata propagation rules to be present in node templates when scaling from zero.
What happened instead?:
my workloads did not cause the autoscaler to scale out as the predicates did not match, this was directly related to the propagated labels not matching (as detected in logs).
How to reproduce it (as minimally and precisely as possible):
- setup a MachineDeployment to use a propagated label to the nodes as described here.
 - configure the MD for scaling from zero, see the readme
 - set its replicas to 
0 - create a workload with a node selector on the propagated label
 - observe
 
Anything else we need to know?:
these labels are also not specifically added when scaling from 1+ but, they would be on a node in that case. i think we probably need to ensure that the propagated labels are always processed.
this function needs to be updated, https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/clusterapi_unstructured.go#L199-L214