Currently if the configuration is valid, but isn't doing what the user wants there is no simple way to find out what the problem is other than asking someone for help or asking an admin to enable debug mode, filter through logs and find what the downscaler is doing.
Problem to solve
Implement a downscaler/debug flag on the workload, this flag is special as it isn't a layer value, nor a run time argument (maybe find a good name for such values). The resourceLogger needs a new function for handling Debug Events.
Further details
Logs should include:
Scaling outcome: up, down, (also reasons for skips: original replicas not set, excluded, already at downscale replicas)
(look for other logs to include)
Proposal
Do the above.
Try not to copy the whole corev1.event{...} struct from the other function, maybe make a private func that they share.
Issue
Currently if the configuration is valid, but isn't doing what the user wants there is no simple way to find out what the problem is other than asking someone for help or asking an admin to enable debug mode, filter through logs and find what the downscaler is doing.
Problem to solve
Implement a
downscaler/debug
flag on the workload, this flag is special as it isn't a layer value, nor a run time argument (maybe find a good name for such values). The resourceLogger needs a new function for handling Debug Events.Further details
Logs should include:
Proposal
Do the above. Try not to copy the whole corev1.event{...} struct from the other function, maybe make a private func that they share.
Who can address the issue
Go Dev
Other links/references