-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[velero] Adhere chart to semver #569
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,14 +42,14 @@ jobs: | |
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
changed=$(ct list-changed --target-branch ${{ github.base_ref }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
|
||
- name: Run chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
run: ct lint --target-branch ${{ github.base_ref }} | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
|
@@ -60,4 +60,4 @@ jobs: | |
|
||
- name: Run chart-testing (install+upgrade) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install --upgrade --target-branch ${{ github.event.repository.default_branch }} | ||
run: ct install --upgrade --target-branch ${{ github.base_ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- velero-helm-charts-v* | ||
|
||
permissions: | ||
contents: write | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Here is an instruction about the Velero helm charts release. | ||
|
||
It involves Helm charts version control and branch control. | ||
|
||
### Helm Charts Version Control | ||
|
||
Our Helm charts are released under two scenarios: | ||
- **Velero Release:** When Velero itself is released. | ||
|
||
- **Chart Updates:** When there are updates specific to the Helm charts. | ||
|
||
The version is defined in [Chart.yaml](charts/velero/Chart.yaml). | ||
|
||
#### Guidelines | ||
To comply with the [Semantic Versioning (semver)](https://semver.org/#summary) rule, follow these instructions: | ||
- **Velero Release:** | ||
- For each Velero minor version release, increase the major version of the Helm charts. For example, if Velero v1.13.0 is released, the Helm charts version becomes 6.0.0; for Velero v1.14.0, it becomes 7.0.0. | ||
|
||
- For each Velero patch version release, increase the minor version. For instance, for Velero v1.13.1, the Helm charts version is 6.1.0; for Velero v1.13.2, it's 6.2.0. | ||
- **Helm Charts Updates:** | ||
- For breaking changes, increase the major version. | ||
|
||
- For added functionality, increase the minor version. | ||
|
||
- For bug fixes, increase the patch version. | ||
|
||
#### Note: | ||
Breaking changes are only allowed for the **latest Helm version**. This restriction ensures that older Helm versions do not have higher major versions than newer ones, preventing helm upgrade issues. | ||
|
||
### Branch Control | ||
|
||
Follow these rules for branch control: | ||
- Our main branch should always align with the latest Velero major version. For example, if Velero v1.13 is the latest major version, any updates in the main branch should target Velero v1.13. | ||
|
||
- Create a new branch prefixed with `velero-helm-charts-v` when Velero releases a new major version. For instance, if the main branch refers to Velero v1.13 and Velero v1.14 is released, name the new branch `velero-helm-charts-v7`. The branch version should match the major version of the Helm charts. | ||
|
||
- Submit PRs for updates related to the newest Velero major version to the main branch. For updates related to older Velero major versions, submit PRs to the corresponding Helm charts branch (e.g., PRs for Velero v1.13.4 go to the `velero-helm-charts-v6` branch if it exists). | ||
|
||
These guidelines ensure consistency and version control for our Helm charts releases. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I don't think the helm chart itself follows the semver because the Velero bumps minor version (functionality change) but the corresponding helm chart changes the major version (breaking changes).
We could consider maintains the velero helm chart and Velero itself with this format . This makes the helm chart follows the semver as well, also we can easily check the helm chart upstream Velero version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jenting
I do not quite understand the format :
The upstream charts follow this versioning: 1.0.#+upX.Y.Z
Could you please give more details explanation?
Our main goal for this PR about versioning is to solve the conflicts in chart versions problem
Not sure the format you mentioned could avoid the conflicts in chart versions problem?
If it could avoid the conflicts, we also need to plan the helm chart version reasonably related format in
1.0.#+upX.Y.Z
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jenting the reasoning behind the chart requiring a major bump for every minor velero bump is because velero itself doesn't follow semver. There are often changes in minor velero updates that require changes to be made to the deployment. To a certain extent the helm chart could catch these and make them non-breaking, however the decision here would be to forego that effort and just admit that the helm chart just "moves fast and breaks things" in a sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having looked at the rancher example, they actually have the same "ruleset" in a sense. The helm major version is always bumped for a minor rancher release (the
100.x.y
examples), just with an additional+up...
.Personally I don't think the additional
+up
is necessary, that's what theappVersion
field in theChart.yaml
is for, and it's what we use to track the upstream version in our deployments.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the Velero bump the major release? How should we tackle in the Velero helm chart?
My thought was
6.1.0-v1.13.0
6.1.1-v1.13.0
6.2.0-v1.13.0
7.0.0-v1.13.0
6.1.1-v1.13.1
6.2.0-v1.14.0
7.0.0-v2.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To the first question: just do a major bump as you'd expect.
To your suggestion: While that sounds fine, the issue raised was that the helm chart can sometimes manage to update to new velero minor versions without a breaking change, but sometimes it does. IMO, while the originally suggested change veers on the safe side (always doing major bumps for minor velero updates, just incase they have a breaking change), you could cover it just by making sure it major bumps if a breaking change is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood.