dev: Update and test Rancher v2.5 Chart - shuo-wu/longhorn GitHub Wiki

Update Rancher v2.5 Chart for Longhorn new release

Update repo rancher/image-mirror

Update repo rancher/charts

  1. Switch to branch origin/dev-v2.5-source
  2. Make the new Longhorn Chart files for Rancher v2.5 ready in advance, and save them in a separate directory. There are 2 ways to prepare the chart files:
    1. Directly run make CHART=longhorn prepare to fetch the current (the old version) Longhorn Chart. Modify the current chart for the new release.
    2. Update the fields commit (the commit of Longhorn chart new release) and packageVersion (this field should be reset to 00 for each new Longhorn version release) in packages/longhorn/package.yaml first. Then Run make CHART=longhorn prepare and solve the conflicts.
  3. Run make CHART=longhorn clean to do cleanup first. Then run make CHART=longhorn prepare to fetch the current Longhorn Chart.
  4. Override packages/longhorn/charts with the new chart files prepared in step1. Then update the CRD sub-chart packages/longhorn/charts-crds.
  5. Modify the fields commit and packageVersion (reset the version to 00 for each new Longhorn version release) in packages/longhorn/package.yaml, and update the roles in the directory packages/longhorn/overlay/ if necessary.
  6. Run make CHART=longhorn patch to update the patch file.
  7. Run make CHART=longhorn clean to remove the chart. In the final PR commit, there should be only 3 components in packages/longhorn: file packages/longhorn/package.yaml, file packages/longhorn/longhorn.patch, and directory packages/longhorn/overlay/.
  • Be careful of the following:

    • the repositories and tags in packages/longhorn/charts/values.yaml should match the mirrored images in repo rancher/image-mirror
    • annotations in file packages/longhorn/charts/Chart.yaml
    • file packages/longhorn/charts/README.yaml
    • labels in file packages/longhorn/charts-crds/templates/crds.yaml
    • file packages/longhorn/charts-crds/README.yaml and packages/longhorn/charts-crds/Chart.yaml
  • Example: https://github.com/rancher/charts/pull/910

Test Rancher v2.5 Chart for Longhorn new release

  1. Switch to branch origin/dev-v2.5. Copy directory charts/longhorn, directory assets/longhorn, and file assets/index.yaml
  2. Switch to branch origin/dev-v2.5-source.
  3. Remove all directories except for longhorn in directory packages/ to avoid unexpected intervenes/failures from other charts. (There are some errors triggered by other charts when I update Longhorn v1.1.0)
  4. Copy the components in step0 back to the Chart repo.
  5. Remove all other charts info in file assets/index.yaml
  6. Run make charts.
  7. Create a commit for these changes in a separate PR and push the PR to Github.
  8. Use the PR in Rancher Cluster Explorer.