Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 5.02 KB

File metadata and controls

85 lines (56 loc) · 5.02 KB

Contributing

Checklist

Before making a contribution to the charts in this repository, you will need to ensure the following steps have been done:

  • Run helm template on the changes you're making to ensure they are correctly rendered into Kubernetes manifests.
  • Lint tests have been run for the Chart using the Chart Testing tool and the ct lint command.
  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, ensure variables are documented in the corresponding values.yaml file and the pre-commit hook has been run with pre-commit run --all-files to generate the corresponding README.md documentation. The pre-commit Workflow will enforce this and warn you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

Note on the Backstage chart dependencies

This project uses a Git Subtree strategy to manage our dependency on the upstream Backstage Helm chart. This allows us to maintain local customizations while keeping a link to the upstream source for future updates.

Unlike standard Helm dependencies that fetch tarballs from a remote repository, our dependency on Backstage is vendored directly into this repository under charts/backstage/vendor/backstage.

Developer workflow

To sync with the upstream Backstage repository, add it as a remote on your local machine:

git remote add -f upstream-backstage https://github.com/backstage/charts.git

When the upstream Backstage team releases an update, we can pull their changes into our subtree:

git fetch upstream-backstage main
git subtree pull --prefix charts/backstage/vendor/backstage upstream-backstage main --squash

# You may also need to update the dependency version under charts/backstage/Chart.yaml

It is important to use --squash to avoid pulling the entire commit history of the upstream chart repository.

Caution

Reviewing subtree syncs: The subtree pull may silently overwrite RHDH-specific local changes to the vendored chart, even when there are no merge conflicts. This can happen because Git's merge algorithm may auto-resolve changes in favor of upstream. After each sync, carefully review the diff to ensure any local customizations (e.g., .gitignore exceptions, template modifications) are preserved. If local changes were lost, restore them manually before merging.

Note: If merge conflicts occur, resolve them in your editor, then git add and git commit the resolution as a normal merge.

Sync Lightspeed vendored config files

The Lightspeed config files under charts/backstage/files/lightspeed are synced separately from the Backstage subtree by hack/sync-lightspeed-configs.sh.

Use the default upstream branch:

./hack/sync-lightspeed-configs.sh

Sync from a release branch or a tag:

./hack/sync-lightspeed-configs.sh --ref release-1.9
./hack/sync-lightspeed-configs.sh --ref v0.5.0

Verify the vendored files are already in sync without writing changes:

./hack/sync-lightspeed-configs.sh --ref main --check

The script copies the upstream config files directly, except it appends the chart-managed mcp_servers block to lightspeed-stack.yaml and renders secret.yaml from upstream env/default-values.env by dropping comment lines plus LIGHTSPEED_CORE_IMAGE and RAG_CONTENT_IMAGE, then converting each remaining KEY=value line into the chart's YAML secret payload. Choose the upstream branch or tag that matches the Lightspeed release you want to vendor.

Important: After any change to the dependency structure or version of the vendored chart, you must rebuild the lock file and local subchart dependencies:

helm dependency update charts/backstage/vendor/backstage/charts/backstage
helm dependency update charts/backstage

To contribute changes back to the upstream repo, you can push them directly to your personal fork of the upstream Backstage charts and open up a PR:

# Push to your personal fork of the upstream Backstage charts repo
git remote add my-upstream-fork ssh://git@github.com/${YOUR_USERNAME}/${MY_FORK}.git
git subtree push --prefix charts/backstage/vendor/backstage my-upstream-fork ${MY_BRANCH}

# Open up a PR on the upstream Backstage charts repository