caas-team / GoKubeDownscaler

A horizontal autoscaler for Kubernetes workloads
GNU General Public License v3.0
9 stars 4 forks source link

Add debug annotation on workload #23

Open jonathan-mayer opened 3 months ago

jonathan-mayer commented 3 months ago

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