Repository navigation
Publish Helm charts as OCI artifacts to GHCR (tooling only) - #814
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prepares the Solr Operator project for publishing Helm charts as OCI artifacts to Docker Hub, addressing issue #813 which aims to modernize the chart distribution mechanism.
Changes:
- Adds a GitHub Actions workflow for publishing Helm charts to Docker Hub's OCI registry with validation and verification steps
- Updates documentation across all README files to include OCI registry installation instructions alongside traditional HTTPS repository methods
- Integrates OCI publishing into the release wizard process as a new step after traditional Helm chart publishing
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/publish-helm-oci.yaml | New workflow for publishing charts to OCI registry with URL validation, checksum verification, and dry-run support |
| helm/solr/README.md | Adds OCI registry installation and upgrade examples with traditional methods as alternatives |
| helm/solr-operator/README.md | Restructures installation section to prioritize OCI registry approach with detailed instructions for both methods |
| hack/release/wizard/releaseWizard.yaml | Adds new release task for OCI publishing with step-by-step instructions and verification commands |
| README.md | Updates main README to highlight OCI registry installation as the recommended approach |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This would be awesome! And since the CRDs are in the apache release archives, I think we can do-away with the nightlies reliance all-together! The copilot suggestions seem to be true, that it is the "apache" oci repo that we are pushing to, and it will use the name in the charts. Also I would love to not include "chart" in the name if at all possible. Obviously there might be overlap issues with the docker image (at least for the Solr-operator, not necessarily solr itself), so if not possible that's ok, but it'll be much cleaner (and keeping the same name as previous versions) if we just keep it "solr" and "solr-operator" |
|
Yes, ideally we'd have a sub-folder |
|
I'm actually not confident there will be a conflict. I just tried it out on https://hub.docker.com/repository/docker/houstonputman/solr-operator/general So at least that issue should be solved. |
|
And the versions will never overlap because the images have versions that start with |
|
I love the idea of automating everything, but currently the release manager has to push to docker-hub anyways. Why not just have them also push the helm chart to docker hub? The GitHub action is quite complex. And eventually we can automate the docker build and push at the same time as automating the helm build and push. |
Hmm, I hate the idea of mixing different artifact types on the same OCI path. If I do a list operation on the OCI I'd need to filter on the "^v" each time to just see the versions. I'm leaning towards publishing helm charts on GHCR for this reason. It's a no-brainer to set it up.
Mainly so not all RMs need to obtain the secret docker-hub credentials which are stored as secrets by INFRA in docker. But also good to have all these steps automated. We could use similar workflow for pushing the operator image? |
Yeah, I had assumed that the oci tools (like ORAS) would do a much better job of differentiating artifact types for you. Apparently they do almost nothing, so unless you are looking at the tags in DockerHub, it's very confusing. I would love to have everything in one place, but I'm not against putting the charts in GHCR right now, and it doesn't stop us in the future putting them in both GHCR and DockerHub if ORAS makes differentiating the two better.
Fair enough, I guess this is a good thing to start with, then we can expand to the image (which will be harder since multi-image build is pretty resource intensive) |
|
@HoustonPutman I've rebased this on main and reworked it — proposing this as the resolution to our earlier discussion about where the charts should live. You were right that Docker Hub can host both images and charts in one repo, with the The chart keeps its natural name I verified the mechanics against my own namespace first: nested paths work, and a public package is anonymously pullable with no On the transition, I propose we cross-publish: every 0.x release goes to both the OCI registry and One thing needing INFRA either way: ghcr.io creates new packages as private, and there's genuinely no self-service path — Does the GHCR path layout look right to you, and are you happy with 1.0.0 as the cutover? |
|
Once I get a +1 on this I can shepherd the steps until we have back-filled v0.8.1 and v0.9.1 onto GHCR and test the new instructions. We should also update instructions on Artifacthub to prefer OCI. |
Adds the machinery to publish released Helm charts to the GitHub Container Registry. This changes no user-facing documentation: the charts on dist.apache.org remain the canonical, signed release artifacts, and the OCI copies are convenience binaries. Switching the documented install path over to OCI is a separate change.
Docker Hub only supports a single namespace level, so 'helm push' (which appends the chart name from Chart.yaml) can only produce apache/solr and apache/solr-operator there. That burns the apache/solr name on a chart rather than a future Solr server image, and mixes chart tags with image tags in one tag list. The previous target, apache/solr-operator-chart, would have resolved to a three-level path and failed at push.
ghcr.io supports nested paths, so the charts go to ghcr.io/apache/solr-operator/helm/{solr,solr-operator}, keeping the chart name 'solr' while leaving apache/solr free everywhere. Public ghcr.io packages are anonymously pullable, so no credentials are needed to install.
The workflow never builds a chart; it re-publishes a verified copy of one that has already been released and voted on:
- Keeps the downloaded basenames. The .sha512 and .prov files reference the
chart's original filename, so renaming to solr.tgz broke 'sha512sum -c'.
- Downloads and pushes the .prov file, so 'helm install --verify' works
against the OCI copy.
- Verifies the detached GPG signatures against the Solr KEYS file. The
checksums alone come from the same host as the charts.
- Accepts URLs from both dist.apache.org and archive.apache.org, since dist
keeps only the most recent release.
- Authenticates with the built-in GITHUB_TOKEN rather than Docker Hub secrets.
- After pushing, logs out and pulls both charts back anonymously, checking
they are byte-identical to the released artifacts. ghcr.io creates packages
as private, and this is what catches that.
- Passes inputs through the environment, pins both azure/setup-helm and the
Helm version it installs, and guards against concurrent runs.
test_cluster.sh gains an -o flag to install the charts from an OCI registry instead of a Helm repo. The release wizard gains a publish step that drives the workflow and then smoke tests the published charts through that flag.
Part of apache#813
|
As mentioned in the issue, splitting this into two parts. This PR is now only the tooling, so we can fix ghcr quietly before announcing its availability. There will be another "cutover" pr with the remaining parts, docs etc. |
|
I'm going to CTR this to get to the ghcr testing and INFRA ticket parts. |

Part of #813
Publishes released Helm charts as OCI artifacts to GHCR:
Tooling only — no docs change. The docs switch is a follow-up, because ghcr.io creates packages private, only INFRA can change that, and INFRA cannot act on packages that do not exist yet. So: merge this, run the workflow to create the packages, INFRA makes them public, verify an anonymous pull, then switch the docs.
Why GHCR, not Docker Hub
helm pushappends the chart name fromChart.yaml, and Docker Hub has one namespace level, so the only target there isoci://docker.io/apache— takingapache/solrfor a chart and mixing chart tags with image tags onapache/solr-operator. @HoustonPutman was right that Docker Hub can host both; GHCR just avoids the trade-off, keeping the chart namedsolrandapache/solrfree. The repo-name prefix is becauseghcr.io/apache/*is shared by all ASF projects, as withghcr.io/apache/airflow/....The workflow
workflow_dispatch, two chart URLs, adry-runflag. It never builds a chart — it re-publishes a verified copy of an already-voted release, and backfills older ones.dist.apache.organdarchive.apache.org;distkeeps only the current release.KEYSfile..sha512and.provreference the real filename, so renaming brokesha512sum -c..prov, sohelm install --verifyworks against the OCI copy.GITHUB_TOKEN: no secrets, and no Docker Hub credentials for release managers.test_cluster.shgains-o OCI_REGISTRY; the release wizard gains a publish step that drives the workflow, then smoke tests through that flag.Verified
Pre-flight against
ghcr.io/janhoy/*: nested pushes work and are anonymously pullable; a 2-level parent and its nested children coexist, soghcr.io/apache/solr-operatorstays free for a future image; private packages fail401, as the re-pull expects. Checksum, signature andhelm verifyall pass against the real v0.9.1 artifacts.Needs INFRA after merge
One ticket to make both packages public (once per chart name), filed after the first push creates them, also confirming
GITHUB_TOKENmay create packages underghcr.io/apache.Not here
The docs switch; the Artifact Hub migration, deferred to the v1.0.0 cutover since it changes every existing
artifacthub.ioURL; andhack/test-upgrade.sh, which pins v0.2.6/v0.2.8 — older than the archive, so it cannot be converted.