Skip to content

Publish a daily GPU Operator chart and OLM bundle with main-branch operand images - #3087

Merged
abrarshivani merged 1 commit into
NVIDIA:mainfrom
abrarshivani:oci-chart-operands-main
Oct 23, 2026
Merged

abrarshivani merged 1 commit into
NVIDIA:mainfrom
abrarshivani:oci-chart-operands-main

Conversation

@abrarshivani

@abrarshivani abrarshivani commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Publish a daily Helm chart and OLM bundle with main-branch operand images for CI and QA, and run forward compatibility against them.

  • publish-main-chart.yaml (daily) resolves the newest main image of each operand, prepares the chart values once, and publishes the chart, the bundle and a build record (chart, bundle and image digests), all tagged 0.0.0-main-<UTC date>, for example 0.0.0-main-20261016. There is one build per date: a run stops if that date's record exists, unless started by hand with overwrite. The record is pushed only when both chart and bundle were published. DCGM, DCGM exporter, GDS, GDRCopy, the driver and the DRA driver stay on released versions.
  • It reuses the RC workflow's pieces: merge-yaml.py for the chart values, update-csv-images.py for the bundle CSV, and two new composite actions, shared by both workflows, that set up the bundle tools and validate and push the bundle. The CSV name and version are unchanged, so a main bundle is installed on its own, not through a catalog.
  • forward-compatibility.yaml (Mondays) installs the chart of the newest recorded build, and fails if it is dated before yesterday (UTC) or its digest changed. e2e-tests.yaml can now install a published chart via chart_reference and chart_version.

Using a main build

VERSION=0.0.0-main-20261016   # or the newest: $(regctl tag ls ghcr.io/nvidia/gpu-operator/main-builds | sort | tail -n 1)
regctl artifact get ghcr.io/nvidia/gpu-operator/main-builds:${VERSION} | jq .
helm install gpu-operator oci://ghcr.io/nvidia/gpu-operator/charts/gpu-operator --version ${VERSION}
operator-sdk run bundle ghcr.io/nvidia/gpu-operator/gpu-operator-bundle:${VERSION}

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint): no Go changes; shellcheck and actionlint are clean on the changed scripts and workflows apart from findings that already exist on main
  • Generated assets in-sync (make validate-generated-assets): no generated assets touched
  • Go mod artifacts in-sync (make validate-modules): no module changes
  • Test cases are added for new code paths: the repo has no shell test framework, so the scripts were tested with local harnesses (below)

Testing

  • Script tests with stubbed curl, regctl, helm and sleep.
  • Packaged a main chart and bundle with real main images: overrides render in the ClusterPolicy, and operator-sdk bundle validate and make validate-csv pass.
  • Ran the daily workflow on a fork: chart, bundle and record were published as 0.0.0-main-20261020, and the record was read back as forward compatibility reads it. Re-running the whole run found that date published and skipped publishing, leaving the chart unchanged.

closes: https://github.com/NVIDIA/cloud-native-team/issues/586


Devin Review

@abrarshivani
abrarshivani requested a review from a team as a code owner October 16, 2026 21:26
@abrarshivani abrarshivani self-assigned this Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/gpu-operator/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Enterprise
  • Run ID: e17dd4a6-a211-4aef-9a45-782499c1974d
📥 Commits

Reviewing files that changed from the base of the PR and between dbb11e8 and eceece4.

📒 Files selected for processing: 8
  • .github/scripts/apply-values-overrides.sh
  • .github/scripts/generate-values-overrides.sh
  • .github/scripts/get-latest-images.sh
  • .github/scripts/get-latest-main-build.sh
  • .github/workflows/e2e-tests.yaml
  • .github/workflows/forward-compatibility.yaml
  • .github/workflows/publish-helm-oci-chart.yaml
  • .github/workflows/publish-main-chart.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

The changes add scripts to generate and apply chart image overrides and to locate recent main builds. A new workflow publishes a main Helm chart and OLM bundle and records their digests. The Helm publishing workflow can package a specified main chart version. E2E workflows accept an optional chart reference and version. The forward-compatibility workflow discovers a recent complete main build and supplies its chart and operator versions to E2E testing.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to eceec

The published chart, build record, and E2E chart selection have no identified merge-blocking mismatch. The change is ready for normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@rahulait

Copy link
Copy Markdown
Contributor

Instead of oci://ghcr.io/nvidia/gpu-operator/charts/gpu-operator:0.0.0-main.20261016021703.gdbb11e85, my preference would be oci://ghcr.io/nvidia/gpu-operator/charts/gpu-operator:0.0.0-main-20261016 as we expect to have one build per day for now, and commit id used is already there in the gpu-operator image in the chart. The URL remains fixed with a set pattern, so a user can simply specify the date to get oci helm chart for that date. They don't need to go back to the repo and also figure out the commit id and timestamp to pull the helm bundle. We could also use daily or something else instead of main if we want to.
@tariq1890 @rajathagasthya @kvalliyurnatt @cdesiniotis thoughts on this.

@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch 5 times, most recently from dca1d9c to 101e1ce Compare October 16, 2026 23:16
Comment thread .github/scripts/apply-values-overrides.sh
@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch 3 times, most recently from fdeec34 to 4c11283 Compare October 20, 2026 18:56
@abrarshivani

Copy link
Copy Markdown
Contributor Author

@rahulait Thanks for the suggestion. Updated the version format to 0.0.0-main.yyyymmdd (e.g., 0.0.0-main.20261020).

Note that: The workflow now skips publishing if a build already exists for that date. An existing build can be replaced by manually running the workflow with overwrite: true.

@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch from 4c11283 to 44447f4 Compare October 20, 2026 20:46

@rahulait rahulait left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @abrarshivani

Comment thread .github/actions/setup-olm-bundle-tools/action.yaml Outdated
@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch from 44447f4 to 56840b2 Compare October 22, 2026 00:13

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +39 to +63
main_build_tags=$(regctl tag ls "${main_build_repository}")
main_version=$(grep -E "${MAIN_VERSION_PATTERN}" <<< "${main_build_tags}" | sort | tail -n 1 || true)

if [[ -z "${main_version}" ]]; then
echo "Error: ${main_build_repository} has no main build" >&2
exit 1
fi

[[ "${main_version}" =~ ${MAIN_VERSION_PATTERN} ]]
published_date="${BASH_REMATCH[1]}"

oldest_accepted_date=$(date -u -d "${max_age_days} days ago" +%Y%m%d)
if (( published_date < oldest_accepted_date )); then
echo "Error: newest main build ${main_version} is older than ${max_age_days} day(s); the scheduled publish did not run or failed" >&2
exit 1
fi

main_build_record=$(regctl artifact get "${main_build_repository}:${main_version}")
operator_version=$(jq -er '.operatorVersion' <<< "${main_build_record}")
recorded_chart_digest=$(jq -r '.chart.digest' <<< "${main_build_record}")
current_chart_digest=$(regctl image digest "${chart_repository}:${main_version}")
if [[ "${current_chart_digest}" != "${recorded_chart_digest}" ]]; then
echo "Error: ${chart_repository}:${main_version} is ${current_chart_digest}, but main build ${main_version} recorded ${recorded_chart_digest}" >&2
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Main build selection lacks regression tests

Changes to get-latest-main-build.sh have no committed tests for stale records or mismatched chart digests. Regressions can select the wrong chart for forward-compatibility tests.

Learn more

Repository guidance requires appropriate coverage for new behavior. The main build lookup is new and determines which published chart the weekly GPU tests install. Its failure branches depend on registry output, artifact contents, UTC dates and digest comparisons, yet the PR adds no repeatable test cases for them. Local harnesses described in the PR are not checked into the repository.

Example: A tag listing contains a current build whose recorded chart digest differs from the registry digest. A test must assert that selection fails rather than emitting a chart version.

Recommended fix: Add committed shell tests using stubbed regctl and a controlled date, covering missing tags, freshness boundaries, invalid records, digest mismatches and a successful lookup. Wire them into an existing CI test target or workflow.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch from 56840b2 to d689cd5 Compare October 22, 2026 20:06
@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch from d689cd5 to 557f604 Compare October 23, 2026 21:53
Add publish-main-chart.yaml, which runs daily and can be started by hand
on the default branch only. It resolves the newest main image of every
operand that publishes per-commit images, prepares the chart values
once, and publishes the chart, the OLM bundle and a build record, all
versioned 0.0.0-main-<UTC date>, for example 0.0.0-main-20261016.
There is one build per date: the run stops when that date's record
already exists, unless it was started by hand with overwrite.

- get-latest-images.sh covers driver-manager, vgpu-device-manager, the
  kata and kubevirt sandbox device plugins and cc-manager, takes several
  components and resolves them concurrently.
- generate-values-overrides.sh takes VALUES_PATH=IMAGE pairs, and
  apply-values-overrides.sh merges them into values.yaml with
  merge-yaml.py, rejects paths that are not image values and checks
  that every image renders unchanged into the ClusterPolicy. The
  operator, validator and node status exporter use the operator image
  of the same commit. dcgm, dcgm-exporter, gds, gdrcopy, the driver and
  the DRA driver stay on their released versions.
- The chart goes into the existing charts/gpu-operator package through
  a new main_chart_version input of publish-helm-oci-chart.yaml.
- The bundle CSV is updated with update-csv-images.py and validated and
  pushed through two composite actions, setup-olm-bundle-tools and
  validate-and-push-olm-bundle, which release-rc-assets.yaml now uses
  too. The operator-sdk version comes from OPERATOR_SDK_VERSION in
  versions.mk rather than the builder label in the bundle annotations,
  which only records the SDK that generated the bundle. The CSV name
  and version are unchanged, so a main bundle is installed on its own.
- push-main-build-record.sh pushes a record of the chart, bundle and
  image digests to gpu-operator/main-builds only when both were
  published.

forward-compatibility.yaml now finds the newest build record with
get-latest-main-build.sh and runs e2e against that build's chart, with
the operator version taken from the record. It fails if the newest
build is dated before yesterday (UTC) or the chart's digest no longer
matches the record. e2e-tests.yaml gets chart_reference and
chart_version inputs to install a published chart instead of
publishing one from the current commit; callers that pass neither
behave as before.

Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
@abrarshivani
abrarshivani force-pushed the oci-chart-operands-main branch from 557f604 to 4601891 Compare October 23, 2026 21:54
@abrarshivani
abrarshivani merged commit 0fbefd5 into NVIDIA:main Oct 23, 2026
21 checks passed
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.

3 participants