clusterapi: HasInstance
function tries to find machine with wrong key
#6774
Labels
area/cluster-autoscaler
area/provider/cluster-api
Issues or PRs related to Cluster API provider
kind/bug
Categorizes issue or PR as related to a bug.
Which component are you using?:
cluster-autoscaler
What version of the component are you using?:
latest master
What k8s version are you using (
kubectl version
)?:1.28.5
What environment is this in?:
clusterapi provider running in an CAPZ cluster
What did you expect to happen?:
HasInstance method is able to find Machine which exists and does not report
machine not found for node: X
What happened instead?:
Lookup of machine is using a wrong key.
The store contains items using
{{cluster-namespace}}/{{machine-name}}
but the lookup uses only{{machine-name}}
as the key.How to reproduce it (as minimally and precisely as possible):
clusterapi_controller.go#findMachine()
Anything else we need to know?:
Autoscaler was run in debug mode using following flags:
I'm not sure if there are specific flags which trigger the store keys being different. I'm going to look this up.
Ping @MaxFedotov - the
HasInstance
method was introduced in #6708 and maybe we could figure out what is different in our envs?The text was updated successfully, but these errors were encountered: