Skip to content
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

Add support for creating repository indexes in JSON format #739

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

MeurillonGuillaume
Copy link
Contributor

@MeurillonGuillaume MeurillonGuillaume commented Dec 7, 2023

What this PR does

Adds support for generating an index.yaml in JSON-format to improve parsing performance (client-side) by using the default json library. Related to helm/helm#12245 and #738.

Testing results

When templating releases for my personal projects, I noticed a ~27% speed improvement in direct comparison of the chartmuseum creating a YAML-formatted versus a JSON-formatted index.yaml.
To be specific, a (rather large) Helmfile release used to take around 6min38s (user time), now takes 5m12s.

What was changed

A flag was added (--json-index) which defaults to false. When set to true chartmuseum will return the index.yaml with JSON-formatted content, as described in the PR mentionned above.
This change should be backwards compatible with all Helm-clients before 3.13.0, since YAML is a superset of JSON, meaning all JSON can be parsed using YAML parsers. To be able to fully take advantage of the performance improvement the client will have to be updated to Helm >3.13.0.

@MeurillonGuillaume MeurillonGuillaume marked this pull request as ready for review December 7, 2023 11:08
@scbizu scbizu self-assigned this Dec 29, 2023
@scbizu
Copy link
Contributor

scbizu commented Dec 29, 2023

I'd plan to ship v0.16.1 soon with some critical CVE fixes , and this PR may delay to next release window .

@scbizu
Copy link
Contributor

scbizu commented Dec 31, 2023

Maybe should upgrade helm dependency together #735

@scbizu scbizu added rc: next and removed size/M labels Dec 31, 2023
@scbizu
Copy link
Contributor

scbizu commented Dec 31, 2023

LGTM , will merge it after v0.16.1 released.

@scbizu scbizu self-requested a review December 31, 2023 11:38
@MeurillonGuillaume
Copy link
Contributor Author

Thanks for the review @scbizu. Is there an ETA for v0.16.1?

@scbizu
Copy link
Contributor

scbizu commented Jan 3, 2024

Sorry but currently has no ETA , still waiting for other maintainers . We will rc ASAP when we are ready for that .

@scbizu scbizu removed the rc: next label Jan 29, 2024
@scbizu scbizu merged commit 90e47f6 into helm:main Jan 29, 2024
2 checks passed
@MeurillonGuillaume MeurillonGuillaume deleted the feature/json-index branch June 4, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants