goldilocks icon indicating copy to clipboard operation
goldilocks copied to clipboard

Feature/make UI more customizeable and fix bugs

Open apamildner opened this issue 1 year ago • 1 comments

Thanks for a great tool for recommendations in kubernetes! I took some time to improve the code to suit our organization better, and I hope you can consider merging at least some of these changes so we don't need to maintain our own fork and others can benefit from this too.

This PR fixes #673, #668, #686

Checklist

  • [x] I have updated/added any relevant documentation
  • [x] I have signed the CLA

Description

This PR fixes some bugs that were present (see the issues linked). It also adds some UI customization options to the dashboard to make it possible to limit what is shown for a give container. The changes should be fully backwards compatible.

What's the goal of this PR?

The goal is to fix some bugs that were present that ruined a bit of the experience using this cool product! It also makes it easier to customize the UI to better fit the individual organizations using this.

What changes did you make?

  • [x] Fix UI bug for yaml copy-paste recommendations even if --enable-cost=false
  • [x] Fix UI bug where 1100Mi (or similar strings of len > 6) would be rendered in Ki instead of just 1100Mi due to a flaw in the roundup logic
  • [x] Add option --enable-cpu-limit-recommendation which when false will no longer show CPU limit
  • [x] Add option --enable-burstable-recommendation which when false will no longer show the "Burstable QoS"

What alternative solution should we consider, if any?

The fix for the 1100Mi (or similar strings of len > 6) is not optimal, my fix only pushes the problem forward (but writing for example 11000Mi is more unlikely to happen). Optimally we would round it down to something like 1.1Gi but I didn't have time to investigate how these conversions work in a good way. There is also the issue that when we are not setting CPU limit, we are technically no longer in the QoS class guaranteed either. In general I think the QoS concept is more confusing than helpful in the dashboard and would see it removed, but I didn't want to make too big changes at this point :+1:

apamildner avatar Jan 12 '24 16:01 apamildner

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Arvid Mildner seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jan 12 '24 16:01 CLAassistant