mongodb: vendor chart via git subtree from bitnami/charts#2420
Open
delthas wants to merge 17 commits into
Open
mongodb: vendor chart via git subtree from bitnami/charts#2420delthas wants to merge 17 commits into
delthas wants to merge 17 commits into
Conversation
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
Required because `git subtree add` cannot run against an existing prefix. The next commit will re-introduce the chart at the same prefix as a `git subtree add --squash` of upstream bitnami/charts at tag mongodb-sharded/9.4.4. Issue: ZENKO-5281
… commit d2eb70018d git-subtree-dir: solution-base/mongodb/charts/mongodb-sharded git-subtree-split: d2eb70018dc4de99fb5c7074265830307470367b
…base/mongodb/charts/mongodb-sharded'
The bitnami packager bundles `bitnami/common` inline under `charts/common/` in the OCI-published chart, but the git source tree does not include it. `helm dependency build` resolves it from oci://registry-1.docker.io/bitnamicharts/common per the `Chart.lock`-pinned version, and we extract the resulting tarball to a directory so `solution-base/build.sh`'s `helm template` invocation finds it as a sub-chart at `charts/common/`. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-add-configsvr-service-file.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/update-default-values.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-exporter-configuration.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-add-configsvr-service.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-add-pv-selector.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-fix-podmonitor.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongos-dep-sts.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/replicaset-entrypoint-configmap.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/statefulset-permissions.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/redirect-logs-to-stdout.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-exporter-disable-collect-all.patch. Issue: ZENKO-5281
All local modifications previously expressed as .patch files in this directory have been migrated to individual git commits applied on top of the `git subtree merge` of upstream `bitnami/mongodb-sharded/9.4.4`. Future upstream merges will produce real three-way merge conflicts against those commits, instead of silent `patch` failures. Issue: ZENKO-5281
Replace the old `helm fetch` + `make patch` flow with `git subtree`- based vendoring of the bitnami/charts GitHub repository: * `solution-base/mongodb/Makefile` — adds the standard subtree machinery (`create-remote`, `fetch-remote`, `update-vendor-branch`, `vendor-sync`) mirroring `solution-base/images/Makefile`. The single maintainer-facing command is `make -C solution-base/mongodb vendor-sync`. `deps` is split out so a fresh clone with a stale `charts/common-*.tgz` can be re-resolved without re-running the ~4-minute subtree split. * `solution-base/mongodb/how_to_upgrade.md` — rewritten to describe the new flow: bump `CHART_VERSION`, run `make vendor-sync`, resolve any three-way merge conflicts as ordinary git conflicts, and keep local tweaks as follow-up commits. * `.github/workflows/end2end.yaml` — remove the `check-mongo-patches` job. Its purpose (verify `make fetch && make patch` produces no drift) no longer applies; there is no `make patch` to verify. Local modifications are now ordinary commits with their own review history, and upstream-vs-local conflicts surface during `git subtree merge` directly. * `.github/copilot-instructions.md` — point the "Chart upgrade path" row at the new flow. Issue: ZENKO-5281
817b861 to
9fed52a
Compare
Contributor
Author
|
Moved from vendoring from git download, to actual git subtree. |
Contributor
Author
|
First commits are setting up the subtree, then each commit is literally moving the patch to a commit, then last commit is cleaning up patches. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch
solution-base/mongodb/Makefilefromhelm fetchagainstcharts.bitnami.comto vendoring the chart sources from thebitnami/chartsGitHub repository viagit subtree, mirroring the pattern that ZENKO-5110 already established for vendored Bitnami images insolution-base/images/Makefile. All local modifications previously expressed as.patchfiles now live as ordinary git commits on top of the subtree merge, ordered chronologically by when each was originally introduced.Why
Bitnami stopped publishing the
mongodb-shardedchart OCI artifact in August 2025 (bitnami/charts#35164). The last published version is9.4.12and any future commit merged intobitnami/chartsmain— including our upstreampgrep -xliveness probe fix in bitnami/charts#36488 — will never reach the Helm registry. The chart source on GitHub is still updated and tagged for every release, so it is now the authoritative place to pull from.Using
git subtree(over acurl | tarsnapshot) gives us:git subtree merge --squashsurfaces upstream-vs-local conflicts directly, instead of silentpatchoverwrites or stale.patchfiles.solution-base/images/Makefile, which already uses the same pattern for the Bitnami container-image vendoring under ZENKO-5110.mongodb-sharded/9.4.14) become a singleCHART_VERSIONchange +make vendor-sync.What changes
solution-base/mongodb/Makefile— full rewrite. New targetscreate-remote,fetch-remote,update-vendor-branch,vendor-sync,deps. The single maintainer command ismake -C solution-base/mongodb vendor-sync(~4 minutes — fetchesbitnami/chartshistory, runsgit subtree split, merges as squash, re-resolvescommon).solution-base/mongodb/charts/mongodb-sharded/— re-introduced as agit subtree --squashof upstream tagmongodb-sharded/9.4.4. Thecommonlibrary chart is resolved viahelm dependency buildand extracted intocharts/common/sosolution-base/build.sh'shelm templatefinds it as a sub-chart.git logarchaeology under the prefix reflects the actual evolution of these tweaks. Each commit message cites the original patch filename for traceability.solution-base/mongodb/patches/deleted entirely.solution-base/mongodb/how_to_upgrade.mdrewritten to describe the new flow..github/workflows/end2end.yaml—check-mongo-patchesjob removed (it verifiedmake fetch + make patchproduced no drift; with patches gone there is nothing to verify, and conflicts now surface as ordinary git merge conflicts duringmake vendor-sync)..github/copilot-instructions.md— Chart upgrade-path row now points atMakefile+make vendor-syncinstead ofpatches/+make patch.What does NOT change
CHART_VERSIONbump +make vendor-syncwhose merge brings in upstream'spgrep -xliveness probe fix.solution-base/deps.yamlis untouched — image references are independent and addressed under ZENKO-5110.solution-base/build.shis untouched — it expectscharts/common/as an extracted directory, which the new Makefile preserves.Verification
helm templateagainst this branch produces manifests equivalent to those of the previoushelm fetch9.4.4 +make patchflow (modulo helm-generated random Secret values per invocation).make -C solution-base/mongodb vendor-syncis idempotent againstmongodb-sharded/9.4.4: re-running on a clean tree produces no diff.Costs
make vendor-syncis a ~4-minute coffee break (subtree split walks 36 599 upstream commits)..gitgrowth of ~41 MB in the maintainer's clone from the synthesized subdir commits; not pushed to origin.bitnami-chartsremote needs to be configured (Makefile does this automatically on first run).History
The PR's earlier revisions implemented the same goal via
curl | tarof the GitHub release tarball. After discussion with @francoisferrand, switched togit subtreeto match thesolution-base/images/precedent and to make future upstream merges produce real merge conflicts rather than silent overwrites. The subtree variant was first explored on a parallel draft PR (#2423, now closed); this PR was force-pushed with the subtree commits.Issue: ZENKO-5281