-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reduce k8s-stack chart size #603
Conversation
@Haleygo i love the idea to go with CRDs only for now, to not introduce breaking change just yet. also anchors hurting readability of values. so lets do just CRDs for now and regarding dashboards i was going to explore https://github.com/grafana/thema if you have some time and energy you could explore this options too |
835f967
to
7c19866
Compare
@Haleygo lets bump minor version of k8s-stack chart also for this change |
Sure, updated! |
5e46ae9
to
ed6efc9
Compare
approved. @Haleygo thanks for a great work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
address #590
There are two commits, first one is to move
/crds
to crd subchart, second is to move/dashboards
to grafana-dashboard subchart.After first move, secret data size drops from 741KB->447KB[294KB ⬇️], full data size drops from 5.1MB->3.8MB[1.3MB ⬇️].
All that comes from crd.yaml. Although crd.yaml raw file size is 973KB, after base64 encoding, it’s over 1.26MB. Before saving to secret, got gzip and another base64 encoding, size becomes about 290KB.
Second move drops secret data size from 447KB->223KB[224KB ⬇️], full data size drops from 3.63MB->1.74MB[1.89MB ⬇️].
All that comes from /dashboards, the gzip compression ratio on dashboard.yaml is better than crd.yaml apparently.
But second move brings some side-effects, see those changes under
charts/victoria-metrics-k8s-stack/values.yaml
. Dashboards resources used to got values from the originalgrafana
subchart and reuse some value like.Values.kubelet.enabled
. Now those values need to be redefined in subchart, it could break the old values setting for old users. I tried to use anchor in yaml to sync subchart values from the original ones, but it failed because anchors are evaluated at the time the values file is loaded into memory, but fields updated via the set flag or other occur after the file was loaded.[more detail].So now it seems no way to reuse the original values completely and it will be a breaking change to all the fields defined in
grafana-dashboards
subchart’s values.So the first move itself already has pretty good effect, we are now have more than 500KB under the default value installation, which looks promising to me. I think we can stop there for a while, when we got more dashboards, we can try the next move.
If that's ok to you, I will revert the second commit. @f41gh7 @hagen1778 @Amper