feat: helm chart version update#2738
Conversation
|
CLA requirements are satisfied for this pull request. |
There was a problem hiding this comment.
Pull request overview
Updates RustFS Helm chart versioning and the Helm packaging GitHub Actions workflow to separate chart version from application version during publishing to Artifact Hub.
Changes:
- Set
helm/rustfs/Chart.yamlchartversionto0.1.0while keepingappVersionas1.0.0-beta.1. - Update
.github/workflows/helm-package.ymlto compute and publish separateapp_versionandchart_versionvalues, and use them in packaging + commit message.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
helm/rustfs/Chart.yaml |
Updates the chart version field (baseline) independently of appVersion. |
.github/workflows/helm-package.yml |
Splits workflow outputs into app_version and chart_version, and applies them when rewriting Chart.yaml and packaging. |
| description: RustFS helm chart to deploy RustFS on kubernetes cluster. | ||
| type: application | ||
| version: "1.0.0-beta.1" | ||
| version: "0.1.0" |
There was a problem hiding this comment.
Chart.yaml version was decreased from 1.0.0-beta.1 to 0.1.0. Helm uses the chart version for upgrade ordering; decreasing it can prevent upgrades or confuse Artifact Hub/index consumers. If the goal is to decouple chart version from appVersion, consider keeping a monotonically increasing chart semver (e.g., match the release tag or use a pre-release like 1.0.0-beta.1) rather than resetting to 0.x.y.
| version: "0.1.0" | |
| version: "1.0.0-beta.1" |
|
|
||
| APP_VERSION="${RAW_TAG#v}" | ||
| BETA_NUM=$(echo "$APP_VERSION" | sed -E 's/.*-beta\.([0-9]+).*/\1/') | ||
| CHART_VERSION="0.${BETA_NUM}.0" |
There was a problem hiding this comment.
BETA_NUM extraction falls back to the full APP_VERSION string when it doesn't match -beta.<num> (sed substitution doesn’t change the line if the pattern doesn’t match). For non-beta versions (e.g., 1.0.0, 1.0.0-rc.1), this will produce an invalid CHART_VERSION like 0.1.0-rc.1.0 and break helm package (or publish an unintended version). Add explicit validation/branching (e.g., detect -beta.<num> and otherwise derive chart_version from app_version) so chart_version is always valid semver.
| APP_VERSION="${RAW_TAG#v}" | |
| BETA_NUM=$(echo "$APP_VERSION" | sed -E 's/.*-beta\.([0-9]+).*/\1/') | |
| CHART_VERSION="0.${BETA_NUM}.0" | |
| APP_VERSION="${RAW_TAG#v}" | |
| case "$APP_VERSION" in | |
| *-beta.[0-9]*) | |
| BETA_NUM="${APP_VERSION##*-beta.}" | |
| case "$BETA_NUM" in | |
| ''|*[!0-9]*) | |
| echo "Unsupported beta version format: $APP_VERSION" >&2 | |
| exit 1 | |
| ;; | |
| esac | |
| CHART_VERSION="0.${BETA_NUM}.0" | |
| ;; | |
| *) | |
| if printf '%s\n' "$APP_VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$'; then | |
| CHART_VERSION="$APP_VERSION" | |
| else | |
| echo "Unsupported app version format: $APP_VERSION" >&2 | |
| exit 1 | |
| fi | |
| ;; | |
| esac |
| VERSION="$RAW_TAG" | ||
| case "$VERSION" in | ||
| v*) | ||
| VERSION="${VERSION#v}" | ||
| ;; | ||
| esac |
There was a problem hiding this comment.
VERSION is still computed but no longer used after introducing app_version/chart_version, which makes the step harder to follow and maintain. Consider removing the unused variable (or using it consistently) to avoid confusion.
Type of Change
Related Issues
Summary of Changes
Checklist
make pre-commitImpact
Additional Notes
Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md). If this is your first contribution, review the CLA document and sign it by commenting
I have read and agree to the CLA.on the PR.