Skip to content
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

Script to generate longhorn.yaml with version replacement #2112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roger-ryao
Copy link
Contributor

@roger-ryao roger-ryao commented Sep 23, 2024

Which issue(s) this PR fixes:

longhorn/longhorn#9512

What this PR does / why we need it:

The script is provided that can:

  • Take arguments for the old version, new version, and Longhorn version.
  • Download the corresponding longhorn.yaml file.
  • Perform a search-and-replace operation to update all relevant image tags.
  • Save the final file with a filename based on the major version number.
> ./update_LH_ver_with_download.sh 

Usage: ./update_LH_ver_with_download.sh <old_version> <new_version> <longhorn_version>

Arguments:
  <old_version>       The version of Longhorn images to be replaced (e.g., v1.6.3, v1.7.1).
  <new_version>       The new version of Longhorn images to use (e.g., v1.6.3-dev-20240922, v1.7.x-head).
  <longhorn_version>  The branch or tag from which to download the Longhorn YAML file.

  Examples:

    # For downloading longhorn.yaml from the v1.6.x branch
    ./update_LH_ver_with_download.sh v1.6.3 v1.6.3-dev-20240922 v1.6.x

    # For downloading longhorn.yaml from the v1.7.x branch
    ./update_LH_ver_with_download.sh v1.7.1 v1.7.x-head v1.7.x

    # For downloading longhorn.yaml from the master branch
    ./update_LH_ver_with_download.sh master-head v1.8.0-dev-20240922 master

Special notes for your reviewer:

Additional documentation or context

@roger-ryao roger-ryao requested a review from a team as a code owner September 23, 2024 03:39
@roger-ryao roger-ryao self-assigned this Sep 23, 2024
@roger-ryao roger-ryao changed the title Generate longhorn.yaml with version replacement Script to generate longhorn.yaml with version replacement Sep 23, 2024
@yangchiu
Copy link
Member

Why can't we just use https://raw.githubusercontent.com/longhorn/longhorn/refs/tags/v1.8.0-dev-20240922/deploy/longhorn.yaml?

@derekbit, why are the Longhorn component versions in the sprint release v1.8.0-dev-20240922 set to master-head instead of being fixed to v1.8.0-dev-20240922? Is this intentional?

image

@roger-ryao
Copy link
Contributor Author

Why can't we just use https://raw.githubusercontent.com/longhorn/longhorn/refs/tags/v1.8.0-dev-20240922/deploy/longhorn.yaml?

If you hadn't asked this question, I don't know that we actually have a sprint release YAML file link available.

@yangchiu
Copy link
Member

@derekbit, why are the Longhorn component versions in the sprint release v1.8.0-dev-20240922 set to master-head instead of being fixed to v1.8.0-dev-20240922? Is this intentional?

image

Need @derekbit to confirm if the sprint release longhorn.yaml is correct.

@roger-ryao
Copy link
Contributor Author

@derekbit, why are the Longhorn component versions in the sprint release v1.8.0-dev-20240922 set to master-head instead of being fixed to v1.8.0-dev-20240922? Is this intentional?
image

Need @derekbit to confirm if the sprint release longhorn.yaml is correct.

After the QA meeting, we created the issue #9529. This script not only provides a workaround but also helps us generate the YAML file for v1.7.x-head or v1.6.x-head.

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.

2 participants